
516 P.2d 541 (1973)
W.P. ATKINSON ENTERPRISES, INC., Petitioner,
v.
DISTRICT COURT OF OKLAHOMA COUNTY et al., Respondents.
No. 46593.
Supreme Court of Oklahoma.
July 31, 1973.
Rehearing Denied September 18, 1973.
George W. Dahnke, Foliart, Mills & Niemeyer, Oklahoma City, for petitioner.
Robert B. Smith, of Miskovsky, Sullivan & Miskovsky, Oklahoma City, for respondents.
*542 SIMMS, Justice:
Petitioner asks this Court to assume original jurisdiction and issue prohibition against Respondent Judges from proceeding further against Petitioner in the trial court.
Petitioner was the defendant in the trial court in a personal injury tort action filed by Carl Rhodes and R.C. Smith for alleged personal injuries sustained at the construction site of an apartment complex being built by the petitioner as general contractor.
The immediate employer of plaintiffs in the trial court was Carlton Bryan, a roofing contractor. The accident occurred during the performance of Bryan's oral contract to provide roofing for a temporary storage building to house materials at the construction site.
Thereafter, the injured workmen successfully prosecuted a claim against the immediate employer, Bryan, in the State Industrial Court. The workmen then commenced their action in the District Court of Oklahoma County against the general contractor.
The issue presented to this Court arises over the trial courts overruling defendant's motions for summary judgment. The trial court stated that the question of whether the building of the storage shed was a Necessary and Integral part of the project was a question for the jury.
Petitioner's job supervisor of the apartment project testified in his deposition that the building had been constructed under his supervision, and that the function of the building was to store materials that needed to be kept dry during the course of the construction project. The supervisor further testified that the storage building was an Integral and Necessary part of the apartment construction project.
Petitioner urges that since the storage shed was a Necessary and Integral part of the apartment project, he is secondarily liable to plaintiffs under the Workmen's Compensation Act. He therefore concludes that he is immune to third party tort liability because exclusive jurisdiction over the subject matter of the action is in the State Industrial Court.
Respondent contends that the test to be used in determining secondary liability of the general contractor is whether the work done by plaintiffs was for PECUNIARY GAIN of petitioner. In support of their contention, respondents cite 85 O.S. 1971, § 3(5):
"`Employment' includes employment only in a trade, business or occupation carried on by the employer for pecuniary gain." (emphasis added)
And, argues that the construction of the storage shed in question was not for the "pecuniary gain" of petitioner. Therefore, respondent concludes that the petitioner is subject to common law liability if the jury determines the construction of the shed was not for the pecuniary gain of petitioner.
In support of its position that the necessary and integral test should be applied in determining the secondary liability in Workmen's Compensation of the general contractor, the petitioner cites Skelly Oil Company v. District Court of Pittsburg County, Okl., 401 P.2d 526 (1964); and, Evans Oil & Gas Company v. Superior Court of Seminole County, Okl., 344 P.2d 670 (1959), in which employees of independent contractors were injured while cleaning petroleum tanks in the respective defendant's oil field; Jordon v. Champlin Refining, 200 Okl. 604, 198 P.2d 408 (1948), employee of an independent contractor was injured while building an aviation gas plant for the defendant; Baldwin v. Big X Drilling Co., Okl., 322 P.2d 647 *543 (1958), employee of independent contractor injured while doing welding on one of defendant's drilling rigs; Sumpter v. Lawton Co-Operative Association, Okl., 384 P.2d 908 (1963), employee of independent contractor injured while doing repair work to put defendant's grain elevator in operating condition; Creighton v. District Court of Seminole County, Okl., 359 P.2d 581 (1961), employee of independent contractor injured while assisting in transporting defendant's drilling rig from one location to another; Dunn v. Public Service Company of Oklahoma, Okl., 487 P.2d 711 (1971), employee of independent contractor injured while relocating power lines owned by defendant electric company. All of these cases are applications for writs of prohibition from district courts. In each case, the Supreme Court, citing the Necessary and Integral test, held that because the principal employer was secondarily liable in Workmen's Compensation, he could not be held liable in the tort action. They cite 85 O.S. §§ 11, 12, and 44, as enacted at the time the decisions were written, for authority.
On the other hand, in support of its position that the PECUNIARY GAIN test should be used, the respondent cites Carper v. Brandon, 195 Okl. 192, 156 P.2d 623 (1945), employee of independent contractor injured while repairing garage for owner of garage and repair business; Amerada Petroleum Company v. Vaughan, 200 Okl. 226, 192 P.2d 639 (1948), employee of independent contractor injured while repairing houses for oil field employees; Meyer and Meyer v. Davis, 162 Okl. 16, 18 P.2d 869 (1933), employee of independent contractor injured while painting funeral home for owner; Standard Savings & Loan Association v. Whitney, 184 Okl. 190, 86 P.2d 298 (1938), employee of independent contractor injured while repainting buildings acquired by Savings and Loan through foreclosure. All these cases are appeals from the State Industrial Court. In each case, the Supreme Court, citing a different test, the pecuniary gain test, held that the principal employer was not liable in Workmen's Compensation. They cite 85 O.S. § 3(5) as enacted at the time the decisions were written, for authority.
The cases cited by petitioner and those cited by respondent can be reconciled on the facts even though a different test was used. However, different results may sometimes obtain by applying the different tests. Thus, there is a need to reconcile the two tests.
The definition of employer in 85 O.S. 1971, § 3, is:
"(3) Employer, except when otherwise expressly stated, means a person * * * employing workmen in hazardous employment * * *." (emphasis added)
Title 85, O.S. 1971, § 11(2), specifically prescribes the persons from whom an injured employee can recover when the immediate employer has failed to provide coverage. One of the persons described is the intermediate contractor or the general contractor. Therefore, the general contractor falls within the language of "except when otherwise expressly stated," cited above. The test of Pecuniary Gain applies only to determine whether Bryan Roofing, the immediate employer is liable in Workmen's Compensation, not Atkinson, the general contractor. To determine whether Atkinson is secondarily liable under the Compensation Act, the Necessary and Integral test must be used.
In Glenwood Properties Corporation v. Walker, Okl., 491 P.2d 286 (1971), this Court sustained an award of the State Industrial Court against a primary employer and stated that the test was not whether the principal employer was engaged in the project for pecuniary gain:
"Under the facts in the present case it is unnecessary to discuss the question of `pecuniary gain.' Such a question is important only in cases where the principal is engaged in a non-hazardous business, not compensable under the general provisions of the statute. 85 O.S. 1961, § 2."
*544 Thus, this Court recognized that the question of Pecuniary Gain is irrelevant when determining whether the general contractor is secondarily liable under 85 O.S. §§ 11, 12, and 44. This Court has heretofore applied the test of Pecuniary Gain in secondary liability cases arising only from the State Industrial Court. But, we now recognize that the only relevant issue in determining secondary liability is whether the employee of the independent contractor is engaged in work that is a necessary and integral part of the employer's principal business, where the employer's principal business is covered by the Workmen's Compensation Act. That is the same test that has always been applied in tort cases arising out of the District Courts.
Now we come to the question of whether the work being done by the employee of the independent contractor, Atkinson Enterprises, was a Necessary and Integral part of the employer's business. The undisputed facts are that it is necessary that material used in an apartment construction project not be left exposed to the elements or casual public display. As the petitioner's supervisor testified in his deposition, we find that the roofing of the temporary tool shed was a necessary and integral part of building an apartment complex.
The motions for summary judgment should have been sustained.
The right for a writ of prohibition in this kind of case is upheld in Evans Oil and Gas Co. v. Superior Court of Seminole County, Okl., 344 P.2d 670 (1959).
Writ of Prohibition Granted.
DAVISON, C.J., WILLIAMS, V.C.J., and BERRY, HODGES, LAVENDER and JACKSON, JJ., concur.
Special Justice FLOYD L. JACKSON on assignment by the Supreme Court served in the place of Justice JOHN B. DOOLIN.
