
605 N.W.2d 193 (2000)
2000 SD 15
Rodney KAISER and Marlys Kaiser, Plaintiffs and Appellees,
v.
NORTH RIVER INSURANCE CO. d/b/a Crum & Forster Insurance Co., Defendant and Appellant.
No. 20946.
Supreme Court of South Dakota.
Considered on Briefs November 29, 1999.
Decided February 2, 2000.
*194 Steven M. Johnson of Johnson, Heidepriem, Miner, Marlow & Janklow, Sioux Falls, South Dakota, and Sheila S. Woodward of Johnson, Heidepriem, Miner, Marlow & Janklow, Yankton, South Dakota, Attorneys for plaintiffs and appellees.
Timothy M. Gebhart and Sandra K. Hoglund of Davenport, Evans, Hurwitz & Smith, Sioux Falls, South Dakota, Attorneys for defendant and appellant.
AMUNDSON, Justice.
[¶ 1.] North River Insurance d/b/a Crum & Forster Insurance (Crum & Forster), the workers' compensation carrier for the City of Yankton, South Dakota (City), appeal the summary judgment granted to Rodney and Marlys Kaiser (Kaisers) declaring that Crum & Forster have no subrogation right to proceeds from a separate underinsured motorist policy purchased by Rodney Kaiser's employer, City. We reverse.

FACTS
[¶ 2.] Rodney Kaiser (Rodney) was employed as a volunteer fireman with City. On March 17, 1996, while responding to a grass fire, Rodney was severely injured when he was struck from behind by an automobile driven by Duane Hausman (Hausman).[1] City carried workers' compensation coverage through Crum & Forster, but had purchased uninsured and underinsured motorist (UIM) coverage of $1,000,000 per person from American States Insurance Company (American) which covered Rodney.
[¶ 3.] After the accident, Crum & Forster began paying workers' compensation benefits to Rodney. Subsequently, Kaisers brought suit against the driver of the automobile.[2] Kaisers ultimately settled their claims with Hausman's liability insurer for his per person policy limit of $50,000 and with City's UIM policy insurer, American, for $925,000.
[¶ 4.] Kaisers brought a declaratory judgment action against Crum & Forster to determine whether Crum & Forster could assert a subrogation interest or right of reimbursement against the UIM proceeds.[3] Prior to trial, Crum & Forster *195 and Kaisers moved for summary judgment. The trial court granted Kaisers' motion for summary judgment and denied Crum & Forster's motion.
[¶ 5.] Crum & Forster appeal, raising the following issue:
Whether the insurer paying workers' compensation benefits has a right to reimbursement from settlement proceeds of UIM benefits that the employee recovers, under a separate policy purchased by his employer, as a result of the same accident.

STANDARD OF REVIEW
[¶ 6.] Our review of a trial court's granting of summary judgment is well settled. We have previously stated:
"In reviewing a grant or a denial of summary judgment under SDCL 15-6-56(c), we must determine whether the moving party demonstrated the absence of any genuine issue of material fact and showed entitlement to judgment on the merits as a matter of law. The evidence must be viewed most favorably to the nonmoving party and reasonable doubts should be resolved against the moving party. The nonmoving party, however, must present specific facts showing that a genuine, material issue for trial exists. Our task on appeal is to determine only whether a genuine issue of material fact exists and whether the law was correctly applied. If there exists any basis which supports the ruling of the trial court, affirmance of a summary judgment is proper."
National Sun Indus., Inc. v. South Dakota Farm Bur. Ins. Co., 1999 SD 63, ¶ 7, 596 N.W.2d 45, 46 (quoting Millard v. City of Sioux Falls, 1999 SD 18, ¶ 8, 589 N.W.2d 217, 218 (quoting Walther v. KPKA Meadowlands Ltd. Partnership, 1998 SD 78, ¶ 14, 581 N.W.2d 527, 531 (citations omitted))). We have previously noted that "[i]f any legal basis to support the court's ruling appears, we must affirm." Plato v. State Bank of Alcester, 1996 SD 133, ¶ 3, 555 N.W.2d 365, 366 (citing De Smet Ins. Co. v. Gibson, 1996 SD 102, ¶ 5, 552 N.W.2d 98; Lee v. Rapid City Area Sch. Dist., 526 N.W.2d 738, 742 (S.D.1995)).
[¶ 7.] The facts in the present case are undisputed; therefore, we will affirm the trial court's granting of summary judgment if the court correctly applied the law. Zoss v. Dakota Truck Underwriters, 1998 SD 23, ¶ 4, 575 N.W.2d 258, 260 (citing Weiss v. Van Norman, 1997 SD 40, ¶ 9, 562 N.W.2d 113, 115 (citations omitted)). We have often stated that "[t]he construction of the workers' compensation statutes and their application to these facts present questions of law, which we review de novo." Id. (citing Kern v. City of Sioux Falls, 1997 SD 19, ¶ 4, 560 N.W.2d 236, 237 (citing Johnson v. Rapid City Softball Ass'n, 514 N.W.2d 693, 695 (S.D.1994))).

DECISION
Whether the insurer paying workers' compensation benefits has a right to reimbursement from settlement proceeds of UIM benefits that the employee recovers under a separate policy purchased by his employer as a result of the same accident.
[¶ 8.] In the present case, Crum & Forster contend that they have a right to a setoff under SDCL 62-4-38. The statute provides:
If an injury for which compensation is payable under this title has been sustained under circumstances creating in some other person than the employer a legal liability to pay damages in respect thereto, the injured employee may, at the employee's option, either claim compensation or proceed at law against such other person to recover damages or proceed against both the employer and such other person. However, in the event the injured employee recovers any like damages from such other person, the recovered damages shall be an offset against any workers' compensation which the employee would otherwise have been entitled to receive.

*196 SDCL 62-4-38 (Supp 1999) (emphasis added). In addition, Crum & Forster also argue that they have a right to reimbursement under SDCL 62-4-39. This section states:

If compensation has been awarded and paid under this title and the employee has recovered damages from another person, the employer having paid the compensation may recover from the employee an amount equal to the amount of compensation paid by the employer to the employee, less the necessary and reasonable expense of collecting the same, which expenses may include an attorney's fee not in excess of thirty-five percent of compensation paid, subject to § 62-7-36.
SDCL 62-4-39 (Supp 1999) (emphasis added).
[¶ 9.] We stated in Zoss, 1998 SD 23, ¶ 10, 575 N.W.2d at 261, that "SDCL 62-4-38 deals with reimbursement of benefits owed but not yet paid when the employee brings the lawsuit against the third party. SDCL 62-4-39 also applies when the employee initiates the lawsuit and concerns reimbursement for benefits already paid." Kaisers argue that SDCL 62-4-39 applies only to "the employer" recovering and Crum & Forster is not an employer. We disagree. We have consistently held that the effect of SDCL 62-4-39 is that it "creates a statutory lien to reimburse an employer or insurer for workers' compensation benefits already paid, less Insurer's share of the expenses and attorney's fee for collecting from the third party tortfeasor." Id., ¶ 6, 575 N.W.2d at 260 (emphasis added). See Liberty Mut. Ins. Co. v. Garry, 1998 SD 22, ¶ 8, 574 N.W.2d 895, 897; National Farmers Union Property & Cas. Co. v. Bang, 516 N.W.2d 313, 321 (S.D.1994). See also SDCL 62-1-2 (noting in the statutory definition of "employer" that "[i]f the employer is insured, it shall include his insurer so far as applicable").
[¶ 10.] Kaisers argue that Crum & Forster cannot assert a subrogation interest in the UIM benefits based upon SDCL 62-3-18. Under this statute, "[n]o contract or agreement, express or implied, no rule, regulation, or other device, shall in any manner operate to relieve any employer in whole or in part of any obligation created by this title except as herein provided." SDCL 62-3-18 (1993).
[¶ 11.] In support of this argument, Kaisers cite Meyers v. Meyers Oil Co., 88 S.D. 166, 216 N.W.2d 820 (1974). In Meyers, the workers' compensation carrier refused to pay medical expenses because they had already been paid by the employee's personal insurance carrier. Id. at 820-21. The circuit court found that "SDCL 62-4-38 had to do only with a third party tortfeasor and did not apply to a payment made by a claimant's personal insurer, citing SDCL 62-3-18." Id. at 821. In affirming the trial court, this Court held,
since accident insurance is a matter of private contract, it would not affect the rights of injured employees to recover under the compensation law. 101 CJS Workmen's Compensation § 1045, p. 628 and SDCL 62-3-18. If a claimant chooses to pay the premium for personal insurance, the compensation carrier should not be the beneficiary of claimant's personal policy in the event of injury.
Id. (citing Anderson v. Industrial Comm'n, 108 Utah 52, 157 P.2d 253 (1945); Fireman's Fund Indem. Co. v. Industrial Accident Comm'n, 226 Cal.App.2d 676, 38 Cal.Rptr. 336 (Cal.Dist.Ct.App.1964)). Kaisers argue that, as in Meyers, private insurance was purchased and this private contract of insurance should not be allowed to relieve the employer or the employer's insurer of its obligation to provide workers' compensation benefits.
[¶ 12.] In the present case, the trial court noted in its memorandum decision that under SDCL 62-3-18,
the UIM policy may not be used by Crum & Forster to relieve its compensation obligations to Rodney. Since the Court deems the UIM policy to be a *197 separate and additional policy for the Kaisers, then allowing Crum & Forster to receive any portion of the proceeds as reimbursement for its workers' compensation benefits would relieve the carrier of its contractual responsibilities.
The trial court found comparable the private insurance coverage by the employee in Meyers and City's private purchase of UIM coverage. Finally, the trial court held that because "South Dakota law does not require UIM coverage for government vehicles, it is only logical that the Court find that the UIM policy be considered a separate and additional policy for the Kaisers." Therefore, the damages recovered by Kaisers are not subject to a workers' compensation lien.
[¶ 13.] Whether a workers' compensation carrier has a right to setoff and reimbursement from UIM proceeds from a private policy purchased by the employer is a question of first impression in this Court. Crum & Forster contend that our ruling in National Farmers, 516 N.W.2d 313, should subject the UIM benefits to the subrogation interest of Crum & Forster. In National Farmers, US WEST Communications (US WEST) was a self-insured employer for both workers' compensation and automobile liability insurance. 516 N.W.2d at 315. Pursuant to South Dakota law regarding self-insurers, US WEST was statutorily required to maintain UIM coverage. Id. at 316. Michael Bergstresser, the injured employee of US WEST, had his own UIM policy with National Farmers. Id. at 315. National Farmers brought suit to determine the extent of Bergstresser's coverage under their policy and whether US WEST was required to provide UIM coverage. Id. The trial court held that US WEST was obligated to provide UIM up to its $100,000 limit, that "US WEST was the primary insurer and National Farmers [was] the secondary or excess carrier, and [finally,] both US WEST and National Farmers were entitled to setoffs for the amount of workers' compensation benefits paid." Id.
[¶ 14.] On appeal, this Court disagreed with the trial court's determination that both US WEST and National Farmers were entitled to setoff for workers' compensation benefits paid to the employee. Id. at 320. We noted that "as the worker's compensation carrier, U.S. West has a statutory worker's compensation lien if the employee collects damages from another person." Id. at 321. National Farmers argued that "the statutory lien is not applicable where the damages received are UIM benefits from a self-insured employer." Id. In rejecting National Farmers argument, we noted:

We are aware there is a jurisdictional split as to whether a worker's compensation carrier's subrogation rights extend to actions based on an employer's UIM policy. [Citations omitted.]
The statutes interpreted in many of the cases disallowing a worker's compensation lien have language limiting subrogation only to actions in tort. SDCL 62-4-39 clearly has no such restriction and allows reimbursement if "the employee has recovered from another person." Moreover, allowing the lien is consistent with South Dakota's public policy of avoiding duplicate recovery for the same injury. [Citations omitted.] Therefore, US West [the self-insured employer] has a statutory lien for any worker's compensation [that it paid and] may apply [the lien] against its liability for UIM.
Id. (emphasis added).
[¶ 15.] As we noted in National Farmers, a split of authority does exist as to whether workers' compensation liens and offsets are barred or allowed in situations where an employer's UIM policy is involved. See National Farmers, 516 N.W.2d at 321. See also 6 Larson's Worker's Compensation Law § 71.23(i) n59-60 (citing cases which reflect the split of authority on this issue). In many jurisdictions which have barred the imposition of a *198 lien or offset by a workers' compensation carrier, the courts have based their determination on the wording of the workers' compensation statutes referring to "legal liability," which sounds in tort, not "contractual" like an insurer's obligation to pay UIM benefits to the beneficiary. See Terry v. State Farm Mut. Auto. Ins. Co., 287 Ill.App.3d 8, 222 Ill.Dec. 485, 677 N.E.2d 1019 (1997); Erie Ins. Co. v. Curtis, 330 Md. 160, 623 A.2d 184 (1993); Truck Ins. Exch. v. State Indus. Ins. Sys., 107 Nev. 995, 823 P.2d 279 (1991); Bannon v. Edrington, 392 So.2d 186 (La.App.1980). While we noted in National Farmers that SDCL 62-4-39 does not contain the restrictive language of "legal liability," which sounds in torts, SDCL 62-4-38 does contain such language. The statute specifically denotes that "[i]f an injury for which compensation is payable ... has been sustained under circumstances creating in some other person ... a legal liability to pay damages [.]" SDCL 62-4-38 (emphasis added).
[¶ 16.] It would be inconsistent to state that employers and insurers have a right to reimbursement for past benefits under SDCL 62-4-39, but are barred from offsetting for future benefits under SDCL 62-4-38. As we noted in Zoss, 1998 SD 23, ¶ 8, 575 N.W.2d at 261, "[s]uch a holding would encourage employees to rush to settlement [with a UIM carrier] in order to reduce the insurer's lien." To allow an employee to retain workers' compensation benefits and UIM policy proceeds would violate South Dakota's public policy against awarding duplicate recovery for the same injury. See National Farmers, 516 N.W.2d at 321. See also Garry, 1998 SD 22, ¶ 7, 574 N.W.2d at 897 (noting that "what [the employee] gets is nothing more than actual restoration to himself of what he has lost because of the third person's wrongful act"); Andreson v. Brink Elec. Const. Co., 1997 SD 104, ¶ 5, 568 N.W.2d 290, 291 (noting that "[d]ouble recoveries are barred under SDCL 62-4-38").
[¶ 17.] In Walkup v. Wabash Nat'l Corp., 691 N.E.2d 1282, 1284 (Ind.App.1998), the court noted that "[u]ninsured motorist insurance is designed to place an injured insured party in substantially the same position he or she would have been had the uninsured driver been insured.... In essence, uninsured motorist insurance acts to pay the damages owed by the uninsured driver." Clearly, had Hausman had adequate insurance, under South Dakota settled law, Crum & Forster would have been entitled to invoke a compensation lien on whatever damages were recovered from Hausman. As noted in Walkup, "[t]hough technically the payment came from [American], it was occasioned by the liability of [Hausman to Rodney] for [Rodney's] injuries. By acting in [Hausman's] stead, the award by [American] is attributable to [Hausman], the third party tortfeasor." Id.
[¶ 18.] Upon reviewing the record, the trial court misapplied the settled law of South Dakota and erred in granting summary judgment in favor of Kaisers in its application of the law. We reverse and remand for trial to determine the amount of reimbursement and offset Crum & Forster are entitled to and to determine the amount of settlement which is exempt from the compensation lien because it represents Marlys Kaiser's loss of consortium damages.
[¶ 19.] MILLER, Chief Justice, and SABERS, KONENKAMP and GILBERTSON, Justices, concur.
NOTES
[1]  Hausman was driving under the influence of alcohol at the time of the collision. Hausman's car had collided with the fire truck, pinning Rodney's legs between Hausman's car and the truck. The accident resulted in amputation of both Rodney's legs and medical expenses incurred of over $125,000.
[2]  In their complaint, Kaisers sought recovery for the injuries sustained by Rodney and Marlys' loss of consortium.
[3]  Initially, the circuit court dismissed the action after determining that proper jurisdiction was with the Department of Labor. This decision was appealed; however, this Court granted the parties' joint motion to remand the matter to the circuit court on April 17, 1998, after two subsequent decisions of this Court, Zoss v. Dakota Truck Underwriters, 1998 SD 23, 575 N.W.2d 258, and Liberty Mut. Ins. Co., 1998 SD 22, 574 N.W.2d 895, clarified that jurisdiction with the circuit court was proper.
