A French marathoner stuck indoors during the coronavirus pandemic found a way to go the distance.

Elisha Nochomovitz took to Facebook on Tuesday to share that even as millions across the globe are in self-quarantine to help prevent the spread of COVID-19, he ran a full marathon -- on his apartment balcony.

"The instructions was to stay home, that's what I did," Nochomovitz wrote on Facebook. "Just to show you that we have no excuses, and please think of all those caregivers who are on the front line in the face of this virus."

In France, there were at least 14,485 COVID-19 cases and 562 deaths as of Sunday morning.

WHAT COUNTRIES HAVE NOT DECLARED ANY KNOWN CASES OF CORONAVIRUS?

Officials in France have cracked down in recent days on people refusing to stay home and venture out only for essential tasks, closing a popular walkway along the Seine River in Paris and imposing a nighttime curfew in the Mediterranean city of Nice.

Nochomovitz shared that he was able to run 26.2 miles by notching thousands of laps on his 23-foot balcony in Balma, a suburb of Toulouse in southern France.

He told The Associated Press that he shared images online as a way to "extend my support to the entire medical personnel who are doing an exceptional job."

He also said he wanted to bring a "bit of humor, to de-dramatize the confinement situation."

In all, it took Nochomovitz six hours and 48 minutes to finish. Along the way, he said he got nauseous and worried about the neighbors below complaining about the pounding of his footsteps.

USA SWIMMING URGES OLYMPICS POSTPONEMENT OVER CORONAVIRUS PANDEMIC

“They were very understanding," he told the AP.

Nochomovitz, who was previously training for a marathon, said he lost track of how many laps he did but his pedometer helped keep track of the total distance.

“I thought about many things, what’s going to happen, when I see that the world has stopped, sports, economy, finance,” he said. “We learned in history about wars between nations, men and weapons, but this is something that is beyond us.”

CLICK HERE FOR MORE SPORTS COVERAGE FROM FOX NEWS

French authorities still allow people to go outside for “individual sports” like running, if they sign a special form explaining why.

But the number of joggers in French streets has multiplied in recent days, amid exceptionally balmy weather. And that has authorities worried that too many people are still outside, threatening efforts to contain the virus.

The Associated Press contributed to this report.