
519 P.2d 151 (1974)
STATE of Montana ex rel. Ben FERGUSON and Ferguson Trucking, Relators,
v.
The DISTRICT COURT OF the EIGHTEENTH JUDICIAL DISTRICT of the State of Montana, IN AND FOR the COUNTY OF GALLATIN and the Honorable W.W. Lessley, Judge thereof, Respondents.
No. 12653.
Supreme Court of Montana.
Submitted January 18, 1974.
Decided February 21, 1974.
Anderson & Dasinger, Bozeman, Douglas D. Dasinger, argued, Bozeman, Norman C. Robb, argued, Missoula, for relators.
Brown & Gilbert, Bozeman, Gene I. Brown, argued, Bozeman, for respondents.
*152 CASTLES, Justice.
This is an original proceeding seeking a writ of supervisory control over the district court of Gallatin County, the Hon. W.W. Lessley presiding. The petition alleges that Judge Lessley acted contrary to the laws of Montana in denying relators' motion for summary judgment.
Relators are Ben Ferguson and Ferguson Trucking. Their petition alleges that an action commenced in respondent district court by George Hoffman against Yellowstone Pine and relators seeks damages for injuries claimed to have been caused by the negligence of Yellowstone Pine Company and/or relators. This action is one of the type referred to in Larson's Workman's Compensation Law, V. I, § 26-10 as an "upside-down" workmen's compensation case, where the employee is attempting, after receiving the benefits, to avoid the restrictions of the Workmen's Compensation Act and pursue a common law action against his employer.
From the depositions and other documents on file in that action, these facts appear: George Hoffman was employed by Yellowstone Pine as a truck driver. He was paid on a per trip basis and was not eligible for the fringe benefits provided to other Yellowstone Pine employees. His work was supervised by relator Ben Ferguson who exercised this supervision as one of his duties as assistant to the president of Yellowstone Pine. In this capacity, Ferguson had the power to hire and fire drivers and to purchase repairs and supplies for the trucks. In addition to supervision of the trucking operation, Ferguson had various other duties which required him to be on call 24 hours a day. For these services he was paid a monthly salary. In all of these duties, Ferguson was subject to the direction and control of the president of Yellowstone Pine. Failure to follow the president's directions would have resulted in Ferguson's discharge and replacement.
Shortly after Hoffman was employed, Yellowstone Pine was informed by union representatives that the trucking operation would either have to be moved from the Yellowstone Pine mill or the truck drivers would have to be included in the union bargaining unit. Because of cost factors Yellowstone Pine wished to avoid inclusion of the truck drivers in the union bargaining unit. In an effort to create the appearance that the trucking operation was separate from the Yellowstone Pine mill operation, the trucks were moved to a shop rented by Yellowstone Pine at a point away from its mill. Certain accounting changes were also made.
Essentially these changes involved the establishing of a break-even haulage fee with the understanding this was to be adjusted up or down as required. This fee was credited to Ben Ferguson. Yellowstone Pine then deducted various items which were paid directly by it for the trucking operation. These items included the cost of the trucks, workmen's compensation premiums, and other expenses incurred for the trucking operation. The balance was then given to Ferguson for deposit in an account which he had opened in his own name at the direction of the president of Yellowstone Pine. From this account checks were drawn by Ferguson to pay the drivers' wages, withholding and social security taxes, and miscellaneous expense of the trucking operation. The haulage fee was adjusted to maintain this account at the break-even point.
After this arrangement was established and went into effect on November 1, 1971, Ferguson continued all of his other duties with Yellowstone Pine and supervised the trucking operation under the direction of the president of Yellowstone Pine. Had he failed to do so he would have been replaced. His compensation remained the same; he did not profit from the trucking operation.
On December 6, 1971, Hoffman was injured in the course of his employment as a driver. Following his injury, he filed a claim for workmen's compensation benefits under the Workmen's Compensation Act and received benefits, including a substantial *153 compromise settlement. In the claim for benefits and the settlement Yellowstone Pine is named as Hoffman's employer. Following settlement of the workmen's compensation claim, Hoffman brought this action, alleging that relator Ferguson was his employer. Both Yellowstone Pine and Ferguson moved for summary judgment. The motion was granted as to Yellowstone Pine and denied as to Ferguson.
We concede that there are factual disputes as to whether or not Hoffman was aware of the various changes made by Yellowstone Pine and regarding the question of negligence but, because of the view we take of relator's first issue, we need not consider those matters here.
The determinative issue is whether or not Hoffman's action is barred by the Workmen's Compensation Act. We hold that it is.
Essentially Hoffman's position is that his employment was transferred from a first employer, Yellowstone Pine, to a second employer, Ferguson, without his knowledge or consent and that a second employer cannot in such a situation claim immunity under the Workmen's Compensation Act from a common law action for negligence. We do not consider the validity of this theory, since it is clear from the undisputed facts that there was no transfer of employment.
The test to determine whether or not an employer-employee relationship exists within the meaning of sections 92-410 and 92-411, R.C.M. 1947, is the so called control test. Under that test an individual is in the service of another when that other has the right to control the details of the individual's work. Nelson v. Stukey, 89 Mont. 277, 300 P. 287; Grief v. Industrial Acc. Fund, 108 Mont. 519, 93 P.2d 961. While this test has most often been used to determine whether or not an individual was an independent contractor or an employee, it may also be used to determine who the employer is, in a given situation. Biggart v. Texas Eastern Transmission Corp. (Miss. 1970), 235 So.2d 443. Under this test an employee will have been transferred from one employer to another when the right to control the details of his work has passed from one to another.
Applying the test to the facts of the instant case, it is clear that the accounting changes undertaken by Yellowstone Pine did not result in a transfer of the right to control the details of Hoffman's work. Hoffman's work continued to be supervised by Ferguson acting as an employee of Yellowstone Pine. This supervision was done as directed by the president of Yellowstone Pine and had Ferguson deviated from those directions, he would have been replaced. Ultimate control of all the details of the work performed by Hoffman was in Yellowstone Pine. The fact that this control was exercised through Yellowstone Pine's employee, Ferguson, does not make him Hoffman's employer, even when considered together with the change in the name on Hoffman's paycheck.
That Ferguson was an employee of Yellowstone Pine is undisputed. Since Hoffman was in fact also an employee of Yellowstone Pine, they were coemployees. Based on the view that the Montana Workmen's Compensation Act is founded on the principles of enterprise liability and enterprise immunity, it has become well settled that where the Act applies, a coemployee is immune from suit. Madison v. Pierce, 156 Mont. 209, 478 P.2d 860; Baird v. Remoir, Sr., 156 Mont. 348, 480 P.2d 186.
The order of the district court denying summary judgment as to relator is vacated. The District court is directed to grant summary judgment to relator Ben Ferguson.
JAMES T. HARRISON, C.J., and DALY, JOHN C. HARRISON and HASWELL, JJ., concur.
