Reed Contracting Services, Inc. (“Reed Contracting”), petitions this court for a *98writ of mandamus directing the Madison Circuit Court (“the trial court”) to vacate its order of October 28, 2015, in which the trial court ordered Reed Contracting and its workers’ compensation carrier to .authorize bilateral knee-replacement surgeries for Henry Riley and to resume paying Riley temporary-total-disability benefits in connection with a work-related accident suffered by Riley. In the October 28, 2015, order, the trial court also stated that it “rescinded” or rejected the date one of Riley’s treating physicians had given for Riley’s having reached maximum medical improvement (“MMI”), and it ordered Reed Contracting to pay Riley “back-pay in the form of accrued temporary-total-disability benefits.”1
The materials submitted to this court in support of the petition indicate the following. Reed Contracting is in the business of paving highways and doing what Riley called “dirt work.” Riley was employed by Reed Contracting, working as a tire technician. In that job, Riley said, he was responsible for repairing tires on all vehicles Reed Contracting used, from company automobiles to heavy equipment like dump trucks, tractors, and earth-moving equipment. There is no dispute that on March 29, 2012, Riley was working in a “man lift” — a device that extends to raise workers in a framed basket to enable them to work at elevated heights — when he lost his footing and fell approximately six feet to the asphalt below. He said that he landed directly on his hands and knees. Riley was taken to Reed Contracting’s company physician, Dr. Eric Roth of the Occupational Health Group, and was treated for pain in both wrists and both knees. Initially, Riley experienced more pain in his right knee, than in his left knee. Riley’s wrist injuries are not at issue in this matter; therefore, we will not set forth facts regarding the extent of those injuries or the treatment of those injuries.
On April 16, 2012, a magnetic resonance imaging (“MRI”) scan was performed on Riley’s right knee. The MRI indicated that Riley had a tear in the medial collateral ligament (“MCL”), or the inside part of his right knee. Dr. Roth referred Riley to Dr. Michael Cantrell, an orthopedic surgeon. Dr. Cantrell first treated Riley on ,May 7, 2012. Riley was still complaining of pain in both knees, but he said that the pain in his right knee was worse. Dr. Cantrell diagnosed Riley with osteoarthritis in addition to the torn MCL and initially recommended conservative treatment, to include physical therapy. At a followup visit on August 16, 2012, Riley was still experiencing pain in both knees. Riley’s left knee was x-rayed, and Dr. Cantrell determined that Riley had a “fracture,” that is, a fragment of bone or material, in his left kneecap. Dr. Cantrell testified that, in his opinion, the fracture was the result of the March 29, 2012, fall. The X-ray also showed that Riley had osteoarthritis in his left knee. In a report that Dr. Cantrell prepared for Dr. Roth, Dr. Cantrell stated that he told Riley he could excise the fragment, which would ease the pain directly over Riley’s kneecap but “would not resolve his osteoarthritic pain, which is present in both knees and has been aggravated by his work injury.” The record indicates that Riley did not have the fragment removed from his left knee.
It appears from the record that Riley then concentrated on obtaining treatment for his wrists, one of which required sur*99gery, and that he next sought medical attention for the pain in his knees on May 13, 2014. On that date, Dr. Cantrell said, Riley stated that his left knee hurt worse than his right knee. Dr. Cantrell had both of Riley’s knees x-rayed. The X-rays showed that Riley had arthritis in the three compartments of both knees. However, Dr. Cantrell testified that the X-rays did not show any kind of fracture or loose fragment of the left kneecap. In the physician notes regarding Riley’s May 13, 2014, visit, Dr. Cantrell stated:
“Arthritis symptoms are not directly related to the work injury, should be treated outside of the work injury with regards to the left knee. I don’t see a fragment on the radiographs, so I’d like to get a CT scan. If there is a separate fragment which is symptomatic, we would excise that and that would be related to his work injury.”
The CT scan was performed on May 21, 2014. According to Dr. Cantrell, the scan showed only “arthritic changes,” and there was no evidence of a recent acute fracture and no scarring or indication of a “fracture site.”
Dr. Cantrell saw Riley for the last time on June 17, 2014. At that time, Dr. Cantrell diagnosed Riley with osteoarthritis in both knees. The physician notes for June 17, 2014, state that Dr. Cantrell prescribed an anti-inflammatory medication and gave Riley a home-therapy program. He also told Riley that, “from here on out, we’d be treating his arthritic symptoms, which are unrelated to his work injury and see him as needed.” Dr. Cantrell placed Riley at MMI on June 17, 2014. He determined that Riley had no impairment to his knees and approved him for full duty.
Riley was not happy with the treatment rendered by Dr. Cantrell and said his knees still hurt to the point that he was unable to do his previous job. He requested a panel of four physicians, as he is permitted to do under § 25-5-77(a), Ala. Code 1975, a part of the Alabama Workers’ Compensation Act (“the Act”), § 25-5-1 et seq., Ala.Code 1975. From that panel of four, Riley chose to be treated by Dr. Jeffrey C. Davis, an orthopedic surgeon. Dr. Davis first saw Riley on October 28, 2014, and on that day, X-rays were taken of both of Riley’s knees. Dr. Davis said that the X-rays indicated that Riley had severe arthritis in both kneecaps and mild to moderate arthritis in the inside part of both knees. Dr. Davis testified that he believed that Riley had knee arthritis that predated or pre-existed his March 29, 2012, injury, but that the arthritis “was made worse and more’ symptomatic as a result of his on-the-job injury.” The record demonstrates that Dr. Greg Cheat-ham, Riley’s personal physician, had diagnosed Riley with arthritis in his knees before the March 2012 accident.
In his deposition, Dr. Davis explained that an injury like Riley’s does not necessarily make existing arthritis worse, but, he said, it can make symptoms of the underlying arthritic condition worse or produce new symptoms. Dr. Davis said the injury “precipitates symptoms or pain, inflammation that’s hard to settle down after that, so that it becomes symptomatic.” Similarly, despite his statement that Riley’s arthritic symptoms were unrelated to the March 2012 accident, Dr. Cantrell also testified that trauma to an arthritic knee such as that experienced by Riley in the fall can aggravate an underlying arthritic .condition and produce new symptoms.
Dr. Davis testified that,- in his opinion, Riley’s March 2012 fall aggravated his preexisting arthritis to produce symptoms that warrant bilateral knee-replacement surgery. Nonetheless, Dr. Davis did express some reservations about the poten*100tial success of the knee-replacement surgeries in Riley’s case given Riley’s failure to respond to conservative treatment. He also said that, although there is no question that Riley suffered an injury to his knees, “[i]t wasn’t a type of injury that I would necessarily associate with subsequently leading to a knee replacement surgery most of the time. That is my hesitation” with saying that the surgeries are, as Reed Contracting’s attorney asked, “actually related to the work injury.” Dr. Davis did note, however, that he believed that the trauma to Riley’s knees accelerated the timing of when Riley needed the surgeries.
Dr. Cantrell testified that he would have no hesitation recommending knee-replacement surgeries for Riley, saying that when all other treatment has failed, knee replacements would be the next step for Riley. Dr. Cantrell testified that he could not say whether the effect of the March 2012 fall on Riley’s knees was an aggravation of Riley’s arthritis, which Reed Contracting’s attorney defined as making the arthritis permanently worse, or whether the effect was an exacerbation of his arthritis, which Reed Contracting’s attorney defined as making the underlying problem temporarily worse but then the underlying problem returns to its pre-injury state. Dr. Cantrell said that Riley would have to be the person to answer that question.
Dr. Davis testified that, if Riley were to have the knee-replacement surgeries, Riley’s current date of MMI would have to be “rescinded” and a new date determined. He said that he anticipated Riley would reach MMI three to four months after the surgeries. Dr. Davis’s records on Riley indicate that, without the surgeries, Dr. Davis would “recommend no change in his date of [MMI] or permanent partial impairment.”
During his testimony, Riley, who was 53 when the accident occurred, acknowledged that, before the March 2012 accident, he had had some pain in his knees from the “normal aging process.” He said that Dr. Cheatham had told him he had some degenerative joint disease or arthritis in his knees and gave him “a cream” that helped. However, Riley said, he had not had problems with his knees before the accident and had been able to do his job without any assistance or problems. Since the accident, however, Riley said that he has “a great deal of pain” in both knees and experiences discomfort while sleeping. He said that, on a scale of 1 to 10, he rated his knee pain as a 6, and that it would sometimes rise to an 8.
After March 29, 2012, Riley said, he had worked security and bundled rags for Reed Contracting but had not returned to his job as a tire technician. He said that he had not been able to work at all since December 22 or 23, 2014, because of the pain in his knees. Riley testified that he must use a “walking stick” while walking up inclines or for walking long distances and that he can no longer run. He also said that he can no longer squat or kneel but that he had been able to do both before the accident.
On October 28, 2015, after hearing Riley’s testimony and reviewing the doctors’ depositions and the other documentary evidence, the trial court entered an order concluding that Riley’s work-related fall on March 29, 2012, caused a “permanent aggravation” of his arthritis. The trial court found that the fall “was a contributing cause of [Riley’s] bilateral knee injuries and the resulting need for bilateral knee replacements.” The trial court further found that the knee-replacement surgeries were medically necessary. The trial court directed Reed Contracting to authorize the *101surgeries within ten days of the date of the order.
The trial court also rejected the date Dr. Cantrell had given for Riley’s having reached MMI because the recommended knee surgeries had not yet been performed. Reed Contracting was ordered to reinstate Riley’s benefits for temporary total disability and to pay him . the amount of such benefits that had accrued from May 26, 2015 — the date Reed Contracting denied authorization of the knee-replacement surgeries and stopped paying those benefits — through October 27, 2015 — the day before the order was entered. The trial court reserved ruling on the extent of Riley’s permanent disability and the loss of earning capacity, if any, resulting from the injuries to his knees and wrists until Riley reached MMI. Reed Contracting timely filed its petition for a writ of mandamus to this court.
This court has determined that
“a mere compensability determination that awards no relief, other than directing an employer to allow medical treatment, is not a ‘final judgment’ that is subject to appellate review, but is instead reviewable by an appellate court only by a petition for a writ of mandamus. See SouthernCare, Inc. v. Cowart, 48 So.3d 632 (Ala.Civ.App.2009).”
Belcher-Robinson Foundry, LLC v. Narr, 42 So.3d 774, 775 (Ala.Civ.App.2010). Because the trial court’s October 28, 2015, order did not determine the extent of Riley’s disability or loss of earning capacity, if any, Reed Contracting properly sought review of the trial court’s order by means of a petition for a writ of mandamus. Id.; Ex parte Fairhope Health & Rehab, LLC, 175 So.3d 622, 625-26 (Ala.Civ.App.2015).
Although a petition for the writ of mandamus and not an appeal is the proper mechanism by which Reed Contracting may obtain review of the October 28, 2015, order, the standard of review set forth in § 25-5-81 (e), Ala.Code 1975, nonetheless applies. Fairhope Health & Rehab, 175 So.3d at 626; Ex parte Advantage Resourcing, Inc., 109 So.3d 170, 172 (Ala.Civ.App.2012).
“Section 25-5-Sl(e), Ala.Code 1975, provides the standard of review in workers’ compensation cases:
‘“(1) In reviewing the standard of proof set forth herein and other legal issues, review by the Court of Civil Appeals shall be without a presumption of correctness.
“ ‘(2) In reviewing pure findings of fact, the finding of the circuit court shall not be reversed if that finding is supported by substantial evidence.’
“Substantial evidence is ‘ “evidence of such weight and quality that fair-minded persons in the exercise of impartial judgment can reasonably infer the existence of the fact sought to be proved.” ’ Ex parte Trinity Indus., Inc., 680 So.2d 262, 268 (Ala.1996) (quoting West v. Founders Life Assurance Co. of Florida, 547 So.2d 870, 871 (Ala.1989)).”
White Tiger Graphics, Inc. v. Clemons, 88 So.3d 908, 910 (Ala.Civ.App.2012).
In reviewing findings of fact,
“[o]ur review is restricted to a determination of whether the trial court’s factual findings are supported by substantial evidence. Ala.Code 1975, § 25-5-81(e)(2). This statutorily mandated scope of review does not permit this court to reverse the trial court’s judgment based on a particular factual finding on the ground that substantial evidence supports a contrary factual finding; rather, it permits this court to reverse the trial court’s judgment only if its factual finding is not supported by substantial evidence. See- Ex parte *102M & D Mech. Contractors, Inc., 725 So.2d 292 (Ala.1998).”
Landers v. Lowe’s Home Ctrs., Inc., 14 So.3d 144, 151 (Ala.Civ.App.2007). Substantial evidence is defined as “evidence of such weight and quality that fair-minded persons in the exercise of impartial judgment can reasonably infer the existence of the fact sought to be proved.” West v. Fourniers Life Assurance Co. of Florida, 547 So.2d 870, 871 (Ala.1989).
In its petition, Reed Contracting contends that substantial, evicjence does not support the trial court’s finding that Riley’s knee-replacement surgeries were necessitated by the March 2012 work injury rather than his pre-existing arthritis. It is well settled that,
“ ‘[flor an injury to be compensable under the Workers’ Compensation Act, the employee must establish both legal and medical causation.’ Ex parte Moncrief, 627 So.2d 385, 388 (Ala.1993). ‘Once legal causation has been established, i.e., that an accident arose out of, and in the course of employment, medical causation must be established, i,e., that the accident caused the injury for which recovery is sought.’ Hammons v. Roses Stores, Inc., 547 So.2d 883, 885 (Ala.Civ.App.1989).”
Ex parte Southern Energy Homes, Inc., 873 So.2d 1116, 1121 (Ala.2003).
In SouthernCare, Inc. v. Cowart, 146 So.3d 1051, 1063 (Ala.Civ.App.2013), ■ this court explained how the determination of medical causation is affected by an employee’s pre-existing condition.
“[I]t is -... well-settled that an employee who suffers from a preexisting condition, like, for example, Cowart’s degenerative disk disease, is not precluded from recovering workers’ compensation benefits merely because his or her condition existed before the work-related incident giving rise to a workers’ compensation claim. See McAbee Constr., Inc. v. Allday, 135 So.3d 968, 974 (Ala.Civ.App.2013). As we have explained:
“ ‘A worker who has a preexisting condition is not precluded from collecting workers’ compensation benefits if the employment aggravates, accelerates, or combines with, a latent disease or infirmity to produce disability. Ex parte Lewis, 469 So.2d 599 (Ala.1985). A preexisting condition that did not affect the [worker’s] work performance before the disabling injury is not considered, pursuant to the Act, to be a pre-existing condition. Associated Forest Materials v. Keller, 537 So.2d 957 (Ala.Civ.App.1988).’
“Waters v. Alabama Farmers Coop., Inc., 681 So.2d 622, 623-24 (Ala.Civ.App.1996). Furthermore, ‘ “[a] trial court may infer medical causation from circumstantial evidence indicating that, before the accident, the [employee] was working normally with no disabling symptoms but that, immediately after-wards, those symptoms appeared and have persisted ever since.” ’ Allday, 135 So.3d at 974 (quoting Waters Bros. Contractors, Inc. v. Wimberley, 20 So.3d 125, 134 (Ala.Civ.App.2009)).”
Moreover, this court has written:
“At the trial-court level, to establish medical causation, the employee must show, through a preponderance of the evidence, that the accident arising out of and in the course of the employment was, in fact, a contributing cause of the claimed injury. Ex parte Trinity Indus., Inc., 680 So.2d 262, 266 (Ala.1996).
“ ‘It is not necessary that the employment-related injury be the sole cause, or the dominant cause, of the death, so long as it was a contributing cause. See Ex parte Valdez, 636 So.2d 401 (Ala.1994). If the employee suffers *103from a latent preexisting condition that inevitably will produce injury or death, but the employment acts on the preexisting condition to hasten the appearance of symptoms or accelerate its injurious consequences, the employment will be considered the medical cause of the resulting injury.’
“Associated Grocers of the South, Inc. v. Goodwin, 965 So.2d 1102, 1110 (Ala.Civ.App.2007).
“The trial court has wide discretion in reaching its findings regarding medical causation. Ex parte USX Corp., 881 So.2d 437, 442 (Ala.2003). It may interpret the evidence according to its own best judgment. 3-M Co. v. Myers, 692 So.2d 134, 137 (Ala.Civ.App.1997). A trial court may infer medical causation from circumstantial evidence indicating that, before the accident, the worker was working normally with no disabling symptoms but that, immediately after-wards, those symptoms appeared and have persisted ever since. See Boise Cascade Corp. v. Jackson, 997 So.2d 1042, 1047 (Ala.Civ.App.2008) (citing Alamo v. PCH Hotels & Resorts, Inc., 987 So.2d 598, 603 (Ala.Civ.App.2007) (Moore, J., concurring specially)).”
Waters Bros. Contractors, Inc. v. Wimberley, 20 So.3d 125, 134 (Ala.Civ.App.2009)(footnote omitted).
Evidence indicates that when Riley fell from the man lift in March 2012, he tore the MCL in his right knee and fractured the kneecap of his left knee. The evidence in this case as to whether- Riley’s need for knee-replacement surgeries was attributable to his March 2012 injuries was disputed. Dr. Cantrell was of the opinion that any treatment provided to Riley after June 17, 2014, would be for his arthritic symptoms, which, Dr. Cantrell said, were unrelated to his work injury. However, Dr. Cantrell also testified that trauma to an arthritic knee such as that experienced by Riley in the fall can aggravate an underlying arthritic condition and produce new symptoms. Dr. Davis testified that, in his opinion, the injuries Riley sustained in the March 2012 fall aggravated his preexisting arthritis, resulting in the acceleration of the need for Riley’s knee-replacement surgeries.
Furthermore, contrary, to Reed Contracting’s assertion in its brief in support of its mandamus petition, there is no evidence indicating that Riley had had “significant prior knee problems” before the accident. Before the March 2012 accident, Riley had visited his personal physician and, on one occasion, had complained of pain and stiffness in his knees. As the trial court found in its order, “the Court finds that this prior complaint was minor and did not present any-ongoing symptoms nor interfere with Mr. Riley’s ability to work. The single generalized complaint of knee pain, to his family doctor in 2010, was successfully treated with a topical gel cream.”
The evidence supports the trial court’s finding. It is undisputed that, to the extent Riley had knee pain from his pre-existing arthritis, it did not affect his ability to perform his job as a tire technician. Before the March 2012 accident, Riley was able to do his job normally, without assistance. Since the accident, however, he has been unable to work-as a tire technician and, instead, has been working in security and bundling rags. There is no evidence indicating that, since the time of the accident, the pain in Riley’s knees has ever been alleviated. In other words, Riley’s symptoms appeared immediately-after the fall and have persisted ever since. See Waters Bros. Contractors, Inc., 20 So.3d at 134.
“ ‘In reviewing a decision of the trial court, an appellate court is not per*104mitted to reweigh the evidence, because weighing the evidence is solely a function of the trier of fact. However, it is the function of the appellate court to ascertain that the trial court’s findings of fact are supported by substantial evidence.... ’
“[Ex parte McInish ], 47 So.3d [767] at 778 [(Ala.2008)].”
Ex parte Caldwell, 104 So.3d 901, 905 (Ala.2012).
From the totality of the evidence presented, the trial court could have determined that the fall aggravated Riley’s preexisting condition to such an extent that it accelerated the need for knee replacements, if, indeed, Riley would ever have needed knee replacements. The trial court also could have reasonably determined that the aggravation of Riley’s arthritis so disabled him that he has been unable to perform his job since the accident. Based on the materials before us, we conclude that substantial evidence supports the trial court’s findings that the March 2012 accident produced not a temporary aggravation of Riley’s pre-existing knee condition, but a permanent aggravation; that the accident was a contributing cause of Riley’s need for bilateral knee-replacement surgeries; and that the knee-replacement surgeries were compensable under the Act. Accordingly, Reed Contracting’s mandamus petition, insofar as it addresses that portion of the trial court’s order directing Reed Contracting to authorize knee-replacement surgeries for Riley, is denied.
Reed Contracting also contends that the evidence does not support the trial court’s order insofar as it directs Reed Contracting to reinstate temporary-total-disability payments retroactive to May 26, 2015 — the date Reed Contracting refused to authorize the recommended knee-replacement surgeries and ended the payment of temporary-total-disability benefits to Riley. Specifically, Reed Contracting argues that there can be a hiatus between periods of temporary total disability and that, because Dr. Cantrell placed Riley at MMI on June 17, 2014, and, at that time, assigned him a 0% impairment rating regarding the injuries to his knees, Riley is not entitled to receive temporary-total-disability benefits unless and until Dr. Davis rescinds the date of MMI in light of the anticipated knee-replacement surgeries. In support of its argument, Reed Contracting cites Perkins v. G.C. Lingerie, Inc., 447 So.2d 796 (Ala.Civ.App.1984), and U.S. Steel Corp. v. McBrayer, 908 So.2d 947 (Ala.Civ.App.2005). In Perkins, this court wrote:
“In a ease such as this where an employee is initially temporarily totally disabled through an accident and then apparently recovers for a period of time, but the disability subsequently re-occurs and becomes evident again, the employee may recover for such a re-occurring disability provided statutory time limits have not expired. Under the same circumstances, an employee may not recover workmen’s compensation during a material intervening time period of non-disability which transpires between periods of temporary total disability. In short, there may be a hiatus between periods of temporary total disability.”
447 So.2d at 797.
On the other hand, Riley argues that he has not yet recovered as much as medically possible because, he says, he has not yet had the knee-replacement surgeries. Accordingly, Riley says, he has not yet reached MMI and is, therefore, entitled to recover the temporary-total-disability benefits the trial court awarded.
“ ‘Temporary total disability refers to “the healing period during which an employee is recovering and unable to work.”’ Ex parte Moncrief, 627 So.2d *105385, 387 (Ala.1993) (quoting Haywood v. Russell Corp., 611 So.2d 365, 367 (Ala.Civ.App.1992)). The ‘ “ ‘time of temporary total disability5 is the recovery period that lasts .until maximum medical recovery is reached.” ’ Ex parte Moncrief, 627 So.2d at 387-88 (quoting Haywood, 611 So.2d at 367). When MMI is reached depends on the circumstances of the particular case. Pemco Aeroplex, Inc. v. Johnson, 634 So.2d 1018, 1020 (Ala.Civ.App.1994).”
Hillery v. MacMillan Bloedel, Inc., 717 So.2d 824, 824-25 (Ala.Civ.App.1998).
We conclude that, under the facts of this case, Riley has the better argument. Although Dr. Cantrell placed Riley at MMI on June 17, 2014, we note that Reed Contracting continued to pay Riley temporary-total-disability benefits until May 2015, when Reed Contracting denied authorization of the knee-replacement surgeries. Since the March 2012 accident, Riley has never been able to return to his job as a tire technician. There has never been a period since the March 2012 accident when Riley had a period of “nondisability,” as was the case in Perkins.2 Riley testified that his knee pain has not subsided. In its order, the trial court stated that it found Riley’s testimony “extremely credible and worthy of belief.”
“ ‘It is well settled that in order for an employee to recover permanent partial or permanent total disability benefits the employee must have reached MMI. Ex parte Phenix Rental Ctr., 873 So.2d 226 (Ala.2003); Hillery v. MacMillan Bloedel, Inc., 717 So.2d 824 (Ala.Civ.App.1998); Edward Wiggins Logging Co. v. Wiggins, 603 So.2d 1094 (Ala.Civ.App.1992); Pemco Aeroplex, Inc. v. Johnson, 634 So.2d 1018 (Ala.Civ.App.1994); and Alabama By-Products Corp. v. Lolley, 506 So.2d 343 (Ala.Civ.App.1987). A claimant has reached MMI when “there is no further medical care or treatment that could be reasonably anticipated to lessen the claimant’s disability.” G.UB.MK. Constructors v. Traffanstedt, 726 So.2d 704, 709 (Ala.Civ.App.1998). When MMI is reached depends on the circumstances of the particular case. Hillery v. MacMillan Bloedel, Inc., supra; Pemco Aeroplex, Inc. v. Johnson, supra.’
“Halsey v. Dillard’s, Inc., 897 So.2d 1142, 1148 (Ala.Civ.App.2004). While the treating physicians generally provide the best evidence concerning maximum medical improvement, the trial court is not bound by their opinions in assigning the date of maximum medical improvement.’ 1 Terry A. Moore, Alabama’s Workers’ Compensation § 13:6 (1998) (footnote omitted). See also Guardian Cos. v. Kennedy, 603 So.2d 1053 (Ala.Civ.App.1992).”
Fort James Operating Co. v. Stephens, 996 So.2d 833, 839 (Ala.2008).
The trial court is not bound by Dr. Cantrell’s opinion that Riley reached MMI on June 17, 2014. The trial court determined that knee-replacement surgeries are necessary and that Riley has not yet reached MMI. Accordingly, Riley cannot recover permanent-partial-disability or permanent-total-disability benefits. If we were to accept Reed Contracting’s argument that Riley is not entitled to receive temporary-disability benefits for the period between May 26, 2015, and when he actually has knee-replacement surgeries, there would be a gap in the payment of benefits Riley is entitled to receive. See § 25-5-57(a)(l) and (2), Ala.Code 1975 *106(providing that- temporary-disability benefits are to be paid during the period of disability until the disability becomes permanent or, in the case of a temporary partial disability, not beyond 300 weeks).
Because substantial evidence supports the trial court’s finding that Riley has not yet reached MMI, we cannot say that the trial court erred in directing Reed Contracting to reinstate payment of temporary-total-disability benefits and to also pay Riley “back pay” for the period during which Reed Contracting unilaterally ended such payments.
For the reasons set forth above, we conclude that Reed Contracting has failed to demonstrate that the trial court erred in entering its order of October 28, 2015, and that it is entitled to a writ of mandamus from this court directing the trial court to vacate that order. Accordingly, the petition for a writ of mandamus is denied.
PETITION DENIED.
PITTMAN, THOMAS, and DONALDSON, JJ., concur. MOORE, J., concurs in the result, without writing.. In its petition, Reed Contracting also asks this court to direct the trial court to vacate its order denying its request for a stay of the October 28, 2015, order. This court considered that matter separately and, on December 17, 2015, issued an order denying Reed Contracting's request for a stay,
. In its petition, Reed Contracting makes no argument regarding the effect Riley’s work in security or bundling rags had on his right to receive temporary-total-disability benefits.