
671 So.2d 106 (1995)
Horace E. SIMS
v.
LELAND ROBERTS CONSTRUCTION, INC.
2940063.
Court of Civil Appeals of Alabama.
June 9, 1995.
Certiorari Denied November 9, 1995.
*107 Charles R. Godwin, Atmore, for appellant.
Michael Gillion and Harry V. Satterwhite of Gillion, Brooks & Hamby, P.C., Mobile, for appellee.
Alabama Supreme Court 1941465.

On Application for Rehearing
CRAWLEY, Judge.
The opinion of April 28, 1995, is withdrawn, and the following opinion is substituted therefor.
This is a worker's compensation case.
Horace E. Sims, an Alabama resident, sued Leland Roberts Construction, Inc. (Roberts), an Indiana corporation, to recover benefits that Sims alleged were due him under the provisions of the Alabama Workers' Compensation Act. The trial court dismissed the cause for lack of subject matter jurisdiction, and Sims appealed.
Sims alleged that he was hired by Roberts in Alabama and that he suffered a knee injury as a result of an accident that occurred on February 11, 1993,[1] while he was working within the scope of his employment with Roberts at a jobsite in the state of Indiana.
In ruling on Roberts's Rule 12(b)(1), Ala.R.Civ.P., motion to dismiss, the trial court had before it the affidavit of Roberts's president. Sims did not submit any matters outside the pleadings in opposition to the motion. However, after the court had dismissed his action, Sims filed a Rule 59(e) motion to alter, amend, or vacate the judgment, and he attached to this motion his deposition. The facts are essentially undisputed. Our standard of review is whether the trial court properly applied the law to the facts. Griffin v. Bank Street Finance, 587 So.2d 349 (Ala.Civ.App.1991).
Under certain circumstances, the Alabama Workers' Compensation Act applies to work-related injuries that occur outside the state of Alabama. Section 25-5-35, Ala.Code 1975, sets out the criteria a worker must meet in order to be compensated under Alabama law for an out-of-state injury. Specifically, § 25-5-35(d)(2) provides:
"If an employee, while working outside of this state, suffers an injury on account of which he ... would have been entitled to the benefits provided by this article and Article 3 of this chapter ... had such injury occurred within this state, such employee... shall be entitled to the benefits provided by this article and Article 3 of this chapter ... provided that at the time of such injury:
"....

*108 "(2) He was working under a contract of hire made in this state in employment not principally localized in any state."
Section 25-5-35(d)(2) establishes a two-pronged test for determining whether an out-of-state injury is compensable under Alabama law. First, the contract of employment must have been made in Alabama. Second, the worker's employment must not have been principally localized in any one state.
The trial court did not rule on the first prong of this test. Without reaching the issue of whether Sims's contract of hire was "made in this state," the trial court held that it had no jurisdiction because, it found, Sims's employment was principally localized in the state of Indiana. The court also determined that it lacked jurisdiction because Sims had signed an agreement to accept workers' compensation benefits under Indiana law. The issue of whether Sims's employment was principally localized in Indiana is dispositive of this case, and, like the trial court, we need not reach the issue of whether Sims "was working under a contract of hire made in this state." We also need not reach the issue of whether Sims's agreement to accept Indiana benefits affects the jurisdiction of an Alabama court to hear his claim under the Alabama workers' compensation laws.
Section 25-5-35(b), Ala.Code 1975, provides that a worker's employment is "principally localized" in another state if
"his employer has a place of business in... such other state and he regularly works at or from such place of business, or if he is domiciled and spends a substantial part of his working time in the service of his employer in ... such other state."
Sims claims that his employment with Roberts was not principally localized in Indiana, because he was working on a pipeline that extended from Indiana into Ohio and was connected to pipelines in other states. In an affidavit, Sims averred:
"This pipeline was several hundred miles long and while I was there, we were working in the state of Ohio and the state of Indiana.... I understood that I would be travelling the length of the pipeline and working wherever I was needed on the pipeline in at least two (2) states. I also understood that the pipeline was connected to other pipelines in other states. I was available to work anywhere in any state along this pipeline where my services were required. I in fact did work in two (2) states while I was on the job and before my injury.
"Although my injury did occur while I was in the state of Indiana, it could very well have occurred in the state of Ohio or perhaps other states because I was performing exactly the same type of work under similar conditions in Ohio as well as Indiana during the time of my employment with Leland Roberts Construction, Inc."
Sims testified by deposition that, while he worked for Roberts, he was on call 24 hours a day to work on any portion of the pipeline and that sometimes he worked in the state of Ohio. He testified that during the four months he worked for Roberts, he stayed at a motel in Kendallville, Indiana. He said that at the end of each job, he always returned to the motel in Kendallville. Sims stated that his paychecks were mailed to the motel and that his crew "called [Kendallville] home."
With its motion to dismiss, Roberts submitted an affidavit that stated, in pertinent part:
"My name is Gary Roberts and I am the president of Leland Roberts Construction Co., Inc. which is an Indiana Corporation. Leland Roberts Construction Co., Inc. is only incorporated in the State of Indiana. The office for Leland Roberts Construction Co., has been at the same location in Sulphur Springs, Indiana for 24 years, and we have no intentions of moving the office. Although Leland Roberts Construction Co., Inc. does some work in the states of Ohio and Kentucky, the substantial portion of our work is done in the State of Indiana, which is also the state where [Sims] was injured."
The material averments of the foregoing affidavit are identical, in legal effect, to the averments of the employer's affidavit in Holcomb v. Arma, Inc., 575 So.2d 575 (Ala.Civ. App.1991), a case in which this court held *109 that the worker's employment was principally localized in the state of Georgia. Despite the fact that Sims "sometimes" worked in Ohio and was available for work there and possibly other states, it is clear that Sims's employer had a place of business in Indiana and that Sims regularly worked at or from that place of business.
The trial court correctly concluded that Sims's employment was principally localized in the state of Indiana and that an Alabama court had no subject matter jurisdiction over Sims's compensation claim.
The judgment of the trial court is affirmed.
ORIGINAL OPINION WITHDRAWN; OPINION SUBSTITUTED; APPLICATION FOR REHEARING OVERRULED; AFFIRMED.
ROBERTSON, P.J., and THIGPEN, YATES, and MONROE, JJ., concur.
NOTES
[1]  This case is governed by the Workers' Compensation Act, Ala.Code 1975, § 25-5-1 et seq., and the amendments effective May 19, 1992.
