
153 P.3d 480 (2007)
Laura FUHRIMAN, in her individual capacity and as a guardian of the minors Amber Fuhriman, Justin Fuhriman, and Sean Fuhriman; Shanna Hunsaker, in her individual capacity and as a guardian of the minors Kristina Hunsaker, Erin Hunsaker, Kaston Lee, Baylee Hunsaker, Patrick Hunsaker, Jerimiah Hunsaker, Shylow Hunsaker, and Jeanetta Hunsaker; Michael W. Williams and Tamara Williams, husband and wife; James L. Wakley; Lorin L. Weeks and Tara Weeks, husband and wife; Victor F. Lindsley and Pamela Lindsley, Husband and Wife, Plaintiffs, and
Dustin R. Stuart; and Ryan Stuart, Plaintiffs-Appellants,
v.
STATE of Idaho, DEPARTMENT OF TRANSPORTATION, Defendant-Respondent.
Nos. 31974, 32224, 32225.
Supreme Court of Idaho, Boise, October 2006 Term.
February 5, 2007.
*482 M. Brent Morgan, PC Chtd., Pocatello, for appellants Stuart and Stuart. M. Brent Morgan argued.
Merrill & Merrill, Chartered, Pocatello, for appellants Fuhriman, Hunsaker and Williams. David C. Nye argued.
Hon. Lawrence G. Wasden, Attorney General, Boise, for respondent.
Eberle, Berlin, Kading, Turnbow, McKlveen & Jones, Boise, for respondent. Warren Jones argued.
BURDICK, Justice.
This case asks the Court to determine whether immunity from a tort suit based on qualification as a statutory employer is an affirmative defense and if so, whether it is waived if not pleaded. This case also asks the Court to determine whether a category one statutory employer under Worker's Compensation Law must be a general contractor or subcontractor and whether a category one statutory employer must exercise a certain degree of control over the work site or the employees working there.

I. FACTUAL AND PROCEDURAL BACKGROUND
On August 23, 2001, an accident occurred during a road construction project near milepost 11.6 on Interstate I-15 in Oneida County, Idaho. The State of Idaho, Department of Transportation (State) owned and maintained the interstate where the accident occurred. This accident resulted in the death and injury of several persons working at the site, all employees of Multiple Concrete Enterprises, Inc. (Multiple).
In 2003 family members of the two men killed, men injured in the accident, and spouses of some of the injured men (Appellants) brought a wrongful death and personal injury suit against the State. Appellants alleged the State was negligent in its decisions regarding the design and safety of the construction zone. Appellants also alleged that the State had a duty to design and maintain an adequate traffic control plan, utilizing adequate safety considerations; the State admitted this in its answer. Finally, Appellants alleged, and the State denied, that prior to the accident the State refused Multiple's requested safety precautions for the workers such as permission to use crossovers *483 and crash attenuators as well as to reduce the speed of traffic.
The State filed a Motion for Summary Judgment. After a hearing and post oral argument briefs, the motion was granted on the basis that the State was a statutory employer and thus entitled to immunity from suit. Appellants filed motions requesting the court to reconsider its order granting summary judgment, which were denied.

II. STANDARD OF REVIEW
"This Court's review of a trial court's ruling on a motion for summary judgment is the same standard used by the trial court in originally ruling on the motion." Robison v. Bateman-Hall, Inc., 139 Idaho 207, 209, 76 P.3d 951, 953 (2003) (citations omitted). The Idaho Rules of Civil Procedure state that summary judgment shall be rendered when "the pleadings, depositions, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law." I.R.C.P. 56(c). "If the evidence reveals no disputed issues of material fact, what remains is a question of law, over which this Court exercises free review." Robison, 139 Idaho at 209, 76 P.3d at 953 (citations omitted).

III. ANALYSIS
There are three separate arguments raised by the parties. First, whether statutory employer immunity is an affirmative defense, and if so, whether it is waived if not pleaded. Second, whether the State in this case qualifies as a category one statutory employer. Finally, if the State prevails on appeal, whether it is entitled to attorney's fees. Each issue will be discussed in turn.
A. The Grant of Defendant's Motion for Summary Judgment Was Proper
Appellants argue that statutory employer immunity is an affirmative defense that is waived if not included in the pleadings. In response, the State asserts that immunity is not an affirmative defense or that if it is an affirmative defense it may be raised for the first time on a motion for summary judgment, and that any procedural deficiency is harmless error.
1. Statutory employer immunity is an affirmative defense
Statutory employer immunity is not specifically listed as an affirmative defense in the Idaho Rules of Civil Procedure. Rule 8(c), I.R.C.P., requires that:
In pleading to a preceding pleading, a party shall set forth affirmatively accord and satisfaction, arbitration and award, assumption of risk, contributory or comparative negligence, discharge in bankruptcy, duress, estoppel, failure of consideration, fraud, illegality, injury by fellow servant, laches, license, payment, release, res judicata, statute of frauds, statute of limitations, waiver and any other matter constituting an avoidance or affirmative defense.
The State argues that Rule 8(c)'s absence of statutory employer immunity means it is not an affirmative defense. However, Rule 8(c) recognizes that there may exist other affirmative defenses not specifically mentioned by including on the list "any other matter constituting an avoidance or affirmative defense."
An affirmative defense is "[a] defendant's assertion raising new facts and arguments that, if true, will defeat the plaintiff's or prosecution's claim, even if all allegations in the complaint are true." Blacks Law Dictionary 186 (2d Pocket ed.2001). Immunity from third party suit as a statutory employer fits within this definition of affirmative defense. Even if all the allegations in Appellants' complaint are true  that the State is liable in tort for the death and injury of several construction workers  the State raises the argument and supporting facts that it is protected by I.C. § 72-223 because it is a statutory employer, and that would defeat Appellants' claim. Therefore, we hold immunity through qualification as a statutory employer is an affirmative defense.
2. Failure to plead the affirmative defense was not a waiver
The State argues that even if statutory employer immunity is an affirmative defense, *484 its failure to plead it was not a waiver. Rule 8(c), I.R.C.P., requires that affirmative defenses be pled, but does not specify the consequences of failing to plead affirmative defenses.
However, this Court has held that an affirmative defense may be raised for the first time on a motion for summary judgment. Bluestone v. Mathewson, 103 Idaho 453, 455, 649 P.2d 1209 1211 (1982). In that case the plaintiff filed a motion for summary judgment alleging a defense she did not plead in her reply to the defendant's cross-complaint. We recognized that some federal circuit courts have held that a party must plead affirmative defenses. However, we declined to follow that line of cases. Though we noted an affirmative defense cannot be raised for the first time on appeal, we held "that where the defense was raised before trial and the defendant was given time to present argument in opposition, the defense . . . can be raised for the first time in the summary judgment motion. . . ." Id.
The issue then becomes whether the defense was raised before trial and whether the defendant was given time to argue in opposition to the defense. The State's actual Motion for Summary Judgment does not mention immunity. It moved for summary judgment on the basis that Appellants failed to state a claim upon which relief may be granted. The State filed a Memorandum in Support of Defendant's Motion for Summary Judgment concurrently with its Motion for Summary Judgment.
The State's Memorandum clearly alerts Appellants as to its position that as a statutory employer it is immune from statutory liability. Ten days later, the Appellants filed their reply brief discussing statutory employer immunity and asserting that the State is not a statutory employer. Debate over statutory employer immunity continued in the hearing held on the State's Motion for Summary Judgment. The parties then submitted additional briefing to the court. Thus, the Bluestone requirement that "the defendant was given time to present argument in opposition" was met. Appellants were alerted to the immunity defense by the Memorandum accompanying the State's Motion for Summary Judgment and had time to respond and present their opposing argument.
Therefore, we hold summary judgment was proper and that the State did not waive its affirmative defense of immunity. Since Bluestone controls, the Court need not reach the State's argument that even if it is required to plead the defense of immunity, the failure to do so is harmless error due to liberal pleading amendment rules.
B. The State is a Category One Statutory Employer
Normally, under the exclusive remedy rule, an injured employee is limited to recovery in worker's compensation and cannot sue in tort. However, I.C. § 72-223 provides an exception to the exclusive remedy rule. Even if an injured employee is entitled to compensation under the Worker's Compensation Law, a third party may still have legal liability to the injured person. I.C. § 72-223(1). The statute specifically excludes certain employers from third party liability. First, the statute excludes from third party liability "those employers described in section 72-216, Idaho Code, having under them contractors or subcontractors who have in fact complied with the provisions of section 72-301, Idaho Code [requiring employers to secure payment of compensation]. . . ." Id. Additionally, the statute excludes "the owner or lessee of premises, or other person who is virtually the proprietor or operator of the business there carried on, but who, by reason of there being an independent contractor or for any other reason, is not the direct employer of the workmen there employed." Id.
In determining whether a party is immune to an I.C. § 72-223 third party liability suit, we "look to the previously established statutory definition of `employer' found in [I.C. § 72-102(13)(a)], as interpreted by this Court." Venters v. Sorrento Delaware, Inc., 141 Idaho 245, 249, 108 P.3d 392, 396 (2005). That definition has two categories. Under the first category, a statutory employer "means any person who has expressly or impliedly hired or contracted the services of another. It includes contractors and subcontractors." *485 I.C. § 72-102(13)(a). In order to qualify as a category one statutory employer, the employer by contracting or subcontracting out services, must be liable to pay worker's compensation benefits if the direct employer does not. Venters, 141 Idaho at 249, 108 P.3d at 396 (citing I.C. §§ 72-216, 72-102, 72-223; Robison, 139 Idaho at 210-11, 76 P.3d at 954-55). When the I.C. § 72-102(13)(a) definition of "employer" is read with I.C. § 72-216(1), "a statutory employer [is] liable for payment of worker's compensation to an employee of its contractor whenever a contractor is liable to its employee under the Worker's Compensation Laws." Id. at 251, 108 P.3d at 398. So, "the qualifying proprietor or operator is the `employer' of the contractor's and subcontractor's employees, and the contractor is also an `employer' of the subcontractor's employees." Id. (emphasis in original) (citations and internal quotations omitted). The Court has summarized the I.C. § 72-223 category one protection for employers as including "employers who make use of a contractor's or subcontractor's employees." Id.
The application of these definitions leads to the conclusion that the State is a category one statutory employer of Multiple's employees, and therefore protected from tort suit by the exclusive remedy rule. The parties agree that the State had a contractual relationship with Multiple. Since the State "expressly . . . contracted the services" of Multiple, it meets the definition of statutory employer. See I.C. § 72-102(13)(a). Multiple, the contractor, was liable to its employees.[1] Since the State is a statutory employer, the State would have had to pay worker's compensation benefits to the employees of Multiple, its contractor, if Multiple did not because Multiple was liable to its own employees. In short, the State made use of a contractor's employees by using them to render the services Multiple contracted to provide.[2] Therefore, the State as an employer is immune from third party liability.
Appellants continue to argue that the definition of a category one statutory employer has been and/or should be interpreted to require that the party seeking immunity also (1) be a general contractor and/or (2) exercise a certain amount of control over the work site or employees working there. The State responds that the current law does not require category one employers to be contractors or to exercise control, and if it does, that the State satisfies both requirements in this case.
1. A category one statutory employer need not be a general contractor.
Appellants first argue that in order to qualify as a category one employer, one must be a general contractor. However, no case law supports this proposition.
When this Court discussed whether a cheese factory and whether a farm owner were category one statutory employers in Venters, we did not classify the parties as contractors or non-contractors. We only applied the first sentence of the statutory definition of "employer" and stated that the farm owner had no "contractual employment relationship" with the injured party and that the cheese factory had a "contractual relationship" with the direct employer of the injured party. Venters, 141 Idaho at 249, 251, 108 P.3d at 396, 398. In fact, this Court noted that the issue as to the cheese factory was "whether it is an employer hiring or contracting for services of a contractor or subcontractor." Id. at 250, 108 P.3d at 397 (emphasis added). Similarly, in Gonzalez v. Lamb Weston, Inc., we never refer to Gonzalez as a general contractor. 142 Idaho 120, 124 P.3d 996 (2005). Our holding was based *486 on the fact that Lamb Weston had "under it a contractor" not that it was a contractor. Id. at 122, 124 P.3d at 998. We conclude, therefore, that there is no support for the proposition that a category one statutory employer must be either a contractor or subcontractor.
2. Control does not factor into a statutory employer analysis.
Appellants next argue that in order to be a category one statutory employer one must exercise control over the work site and the employees working there. Appellants assert that to find someone is an independent contractor necessarily means the other party is not a statutory employer, and since "control" factors into an independent contractor analysis, it must factor into a statutory employer analysis.
However, this Court has only found the "right to control" test to be relevant when determining whether an injured person is an employee or independent contractor or when distinguishing between a direct employer and a non-direct employer. See Runcorn v. Shearer Lumber Prods., Inc., 107 Idaho 389, 392, 690 P.2d 324, 327 (1984). Furthermore, "[t]he test of whether a party is an `employer' under the definition of [I.C. § 72-102(13)(a)] does not require the employer to control the means by which the work is performed." Id.; see also Dewey v. Merrill, 124 Idaho 201, 203, 858 P.2d 740, 742 (1993). To combine the statutory employer and independent contractor analysis confuses the issue. As Justice Eismann pointed out, "[a] person must first be an employee before he or she can have a statutory employer." Shriner v. Rausch, 141 Idaho 228, 233, 108 P.3d 375, 380 (2005) (Eismann, J., concurring). Thus, once an injured party gets past the employee/independent contractor analysis, he can then go to the statutory employer analysis. These are two separate steps and the factors of one analysis should not be automatically imputed onto the other. The "right to control" test need not be applied when determining whether a person is a category one statutory employer.
In conclusion, we hold the State is the statutory employer of Multiple's employees. Furthermore, we hold there is no requirement that a category one statutory employer must be a contractor or subcontractor in the classic sense of the word. Additionally, we hold that control over the work site or employees working there is not a factor in the category one statutory employer analysis.
C. The State is not entitled to attorney's fees on appeal
The State seeks attorney's fees under I.C. §§ 12-117 and 12-121. A prevailing state agency must be awarded "reasonable attorney's fees, witness fees and reasonable expenses, if the court finds that the party against whom the judgment is rendered acted without a reasonable basis in fact or law." I.C. § 12-117(1). We decline to award attorney's fees to the State under this statute because Appellants did not act without a reasonable basis in fact or law.
We also decline to award the State attorney's fees under I.C. § 12-121. That statute allows an award of "reasonable attorney's fees to the prevailing party. . . ." We do not agree with the State that Appellants have pursued this appeal frivolously, unreasonably, and without foundation. Therefore, we deny the State's request for an award of attorney's fees.

IV. CONCLUSION
We hold statutory employer immunity is an affirmative defense and that in this case the State's failure to plead its defense did not constitute a waiver. We also hold that the State is the Appellants' statutory employer and thus immune from tort suit. Hence, we affirm the district court's order granting the State's Motion for Summary Judgment. Costs to Respondent.
Chief Justice SCHROEDER and Justices TROUT and EISMANN concur.
JONES, J., Specially Concurring.
The Court's opinion correctly applies the applicable law to the facts of this case and I therefore concur. It may seem odd that a third party which is not the direct employer of the injured workers and which is alleged *487 to have violated a duty owing to the highway-using public at large, should be shielded from liability for its alleged negligence. During oral argument, the State's counsel conceded that statutory employer immunity may not have precluded Appellants' negligence claim, had their damages resulted from the State's negligence in another location down the road, off of the location where the contractual work was being performed. Had any person other than a statutory employee been injured or killed by the State's alleged failure to design and maintain a safe traffic control plan, the State would not have had immunity. Even though the traffic control plan was not part of the work being performed under contract by the direct employer of the injured workers, the State is able to take advantage of the statutory employer immunity. This was not always the case.
In Runcorn v. Shearer Lumber Products, Inc., 107 Idaho 389, 690 P.2d 324 (1984), this Court held that a third party could be held liable for damages even though it fell within the statutory employer definition. This was so because I.C. § 72-223 then provided that an injured employee could sue a third party for damages and that a third party subject to such liability "shall include those employers described in section 72-216, Idaho Code, having under them contractors or subcontractors who have in fact complied with the provisions of" the statute requiring procurement of workmen's compensation insurance. Id. at 393, 690 P.2d at 328. However, a simple legislative change in 1996 effectively overruled the Runcorn holding. Chapter 191 of the 1996 Session Laws simply added a "not" after "shall" in the above-quoted language so that third parties subject to suit "shall not include" those employers described in section 72-216, Idaho Code. Thus, despite the fact that employees of the direct employer in this case called to the State's attention the unsafe conditions created by the State's traffic control plan at the work site, concerns which the State ignored to the substantial detriment of the Appellants, the State can properly claim immunity from a damage claim. The employees had pointed out the need to lower the speed limit, put in crash attenuators, or allow crossovers, in order to put some separation between the workers and the fast moving traffic. The State declined to take such measures. It is alleged that two statutory employees died and several others were severely injured as a result. Because of the current language of section 72-223, the sole source of compensation of the Appellants is under the worker's compensation law.
NOTES
[1]  The parties agree that Multiple is a contractor or subcontractor. It does not change the analysis that at one point in its brief the State calls Multiple an independent contractor. For the purposes of I.C. § 72-223, independent contractors who employed the injured worker fall within the contractor/subcontractor category. Kolar v. Cassia County Idaho, 142 Idaho 346, 352, 127 P.3d 962, 968 (2005).
[2]  Furthermore, Multiple carried worker's compensation insurance, so there was compliance with the I.C. § 72-223 provision requiring that a category one employer has under him a contractor that complied with I.C. § 72-301. See I.C. § 72-223(1).
