Under CCP 685.040, attorney fees incurred in enforcing a judgment may be recovered if the judgment includes an award of attorney fees pursuant to contract. This decision holds that a judgment that awards attorney fees, suffices to allow an award of attorney fees incurred in enforcing the judgment even though neither the judgment nor any post-judgment order set an amount of attorney fees awarded under the judgment itself.