
381 N.W.2d 625 (1986)
Dennis C. FARRIS and Judy Farris, Husband and Wife, Appellees,
v.
GENERAL GROWTH DEVELOPMENT CORPORATION, Appellant.
No. 85-98.
Supreme Court of Iowa.
February 19, 1986.
James E. Walsh, Jr. and Gail D. Fokken, of Clark, Butler, Walsh & McGivern, Waterloo, for appellant.
Edward J. Gallagher, Jr. and Gregory T. Racette, of Gallagher, Langlas & Gallagher, P.C., Waterloo, for appellees.
Considered by REYNOLDSON, C.J., and McGIVERIN, LARSON, CARTER, and WOLLE, JJ.
LARSON, Justice.
Plaintiff, Dennis C. Farris, was injured as an employee of a subcontractor on a construction site in Cedar Falls, Iowa. He received workers' compensation benefits, then sued the general contractor for damages. See Iowa Code § 85.22 (1983) (suits by employees against third parties). The workers' compensation insurer filed a lien in the negligence action to recover the amount of the workers' compensation benefits it had paid to Farris. Id. Farris obtained a judgment against the general contractor, *626 and the workers' compensation insurance company (Milwaukee Mutual) was reimbursed for its workers' compensation payments. This appeal involves the narrow question of whether the district court erred in deducting attorney fees from the amount Milwaukee Mutual had recovered.
The workers' compensation benefits received by Farris from Milwaukee Mutual totaled $102,424.44. When Farris later recovered $295,000 in his third-party suit against the general contractor, the lien filed by Milwaukee Mutual was satisfied in full. This left Milwaukee Mutual less than ecstatic, however, because it was also the liability carrier for the defendant in the third-party suit. It complains that the judgment in the third-party action merely forced it to take money out of one of its pockets and put it in another, a process which did not require the services of an attorney. Milwaukee Mutual therefore protested the court's deduction of attorney fees from the amount of its lien. See Iowa Code § 85.22(1) (1983).[1]
Milwaukee Mutual argues that section 85.22(1), providing for payment of attorney fees does not necessarily require that the fees be apportioned between the employee and the indemnitee. It argues that this statute would permit assessment of all of the fees to the employee under some circumstances, and that the district court erred in failing to order the fees paid by the employee. It also argues that the court erred by failing to exercise its discretion in setting the amount of fees to be paid.
Iowa Code section 85.22(1) provides:
If compensation is paid the employee... under this chapter, the employer by whom the same was paid, or his insurer which paid it, shall be indemnified out of the recovery of damages to the extent of the payment so made, with legal interest, except for such attorney fees as may be allowed, by the district court, to the injured employee's or his personal representative's attorney, and shall have a lien on the claim for such recovery and the judgment thereon for the compensation for which he is liable. In order to continue and preserve the lien, the employer or insurer shall, within thirty days after receiving notice of such suit from the employee, file, in the office of the clerk of the court where the action is brought, notice of the lien.

I. Exercise of Court's Discretion.

The district court ordered Milwaukee Mutual to pay one-third of the amount it recovered under its lien. In setting fees under section 85.22(1), we have said a court
should consider all the elements which have a bearing on attorney fees to be allowed in a given case including but not necessarily limited to the time spent, the nature and extent of the services, the amount involved, the difficulty of handling and importance of the issues, the responsibility assumed and the results obtained, as well as the professional standing and experience of the attorney. Under some circumstances a one-third contingent fee might be reasonable, but it should be based on the facts and circumstances of the particular case rather than the contract between the employee and his counsel.
Kirkpatrick v. Patterson, 172 N.W.2d 259, 261 (Iowa 1969) (citations omitted).
In Kirkpatrick, this court disapproved a fee order based solely on a contingent fee agreement, without an independent determination of reasonableness by the court. We remanded for a hearing to make that determination. Id. at 261-62. Milwaukee Mutual suggests that a similar problem exists here, pointing to the abbreviated ruling of the court which merely noted the length of the trial and its complexity, and *627 concluded that a one-third fee was reasonable.
We do not believe this case presents the same problems as Kirkpatrick. In contrast to that case, the record before the court here revealed a lengthy pretrial, trial, and appellate proceeding. (The judgment against the third party was affirmed by the court of appeals, reported as Farris v. General Growth Development Corp., 354 N.W.2d 251 (Iowa Ct.App.1984)). And, unlike the court in Kirkpatrick, the district court here made an independent determination of reasonableness. We believe that the determination was well supported by the record.
II. Construction of Iowa Code Section 85.22(1).
In two related arguments, Milwaukee Mutual argues that a court may require the indemnitee to share part of the attorney fees and costs under section 85.22(1), but it is not required to do so. It suggests that the 1959 amendment to that section (which had previously not allowed payment of any fees by the indemnitee) was enacted to prevent the indemnitee's unjust enrichment. Here, there was no benefit to the indemnitee, it argues, because it was required to pay the resulting judgment.
Milwaukee Mutual also argues that a proper application of section 85.22(1) would require that, upon recovery in a third-party case, fees and costs should first be deducted from the judgment, then the workers' compensation indemnitee should be paid in full (without reduction for fees), and any balance paid to the employee. Using that approach here, the effect would be to assess the entire fee to Farris; the full lien amount of $102,000 would be paid to Milwaukee Mutual without reduction for attorney fees.
Farris argues that Milwaukee Mutual should pay its share of the attorney fees. The district court agreed, and so do we. If the controlling purpose of section 85.22(1) is said to be to prevent unjust enrichment to an indemnitee, Milwaukee Mutual's position would be correct; it was not enriched by this third-party suit. On the other hand, if the purpose of the section is to provide a fair distribution of fees under the exercise of a court's judgment, it would have to be construed in favor of Farris. We believe the latter is the correct view.
Milwaukee Mutual candidly concedes that, if there were two separate insurance carriers involved, the workers' compensation insurer should pay its share of the fees. We do not believe it is fair, or in conformity with the intent of section 85.22(1), to penalize an employee in a third-party suit because it happened that one insurance company had both ends of the insurance coverage.
We affirm.
AFFIRMED.
NOTES
[1]  General Growth, not Milwaukee Mutual, was the defendant in the third-party action and is the named appellant here. Nevertheless, it is Milwaukee Mutual's double exposure as workers' compensation carrier and liability insurer which generates the issues on appeal. The parties have therefore referred to Milwaukee Mutual as if it were the appellant. For clarity, we will do so as well.
