An Arizona man who set fire to a cabin in the Grand Canyon National Park where his ex-girlfriend was staying was sentenced last week to nearly two years in prison. 

Dahntay Dunbar, 21, a Flagstaff resident, was arrested in May after he broke into her locked cabin and set a fire inside, the Department of Justice said Tuesday. 

Federal prosecutors said that Dunbar had found a bottle of clear liquor and dumped it on a bed before igniting a shirt belonging to his former girlfriend. She was not in the cabin at the time. 

"The bed started to burn, and Dunbar left the cabin," a DOJ statement said. "The fire caused scorching, burn damage, and smoke damage to the walls, ceiling, and other parts of the cabin."

AMERICAN NATIONAL PARKS VANDALIZED, RUINED BY VISITORS, COULD TAKE CENTURIES TO REMEDY: REPORT

Entrance sign for Grand Canyon National Park in Arizona. A man will serve prison time after setting fire to a cabin inside the park, federal prosecutors said.  (Jim Lane/Education Images/Universal Images Group via Getty Images)

A bystander saw the blaze and extinguished most of the flames before firefighters arrived on the scene, according to court documents. 

AMERICA THE BEAUTIFUL: 50 MUST-SEE LANDMARKS THAT TELL OUR NATIONAL STORY

Dahntay Dunbar will spend two years in prison for setting the fire. (Pilar Arias/Fox News Digital)

The cabin was owned by the resort company Xanterra. The blaze caused more than $40,000 in damage, authorities said. 

Dunbar was arrested by park rangers a short time later. On July 8, he pleaded guilty to arson of a dwelling. 

Days before the fire, Dunbar got into a dispute with the unnamed woman and punched through one of the windows, court documents state. 

CLICK HERE TO GET THE FOX NEWS APP

In addition to a prison sentence, he was ordered to pay $20,146.13 in restitution and is subject to five years of supervised release after he serves his time.