PHOENIX — An off-duty border patrol agent pleaded guilty Friday to starting the Sawmill Fire, which caused $8 million worth of damage in Arizona in April 2017.

Dennis Dickey, 37, of Tucson pleaded guilty to a misdemeanor violation of U.S. Forest Service regulations, according to a news release from the U.S. Attorney’s Office, District of Arizona.

Dickey fired a rifle at a target he had filled with the highly explosive substance Tannerite in Green Valley, Arizona, for a gender-reveal party. The shots that hit the target caused an explosion that ultimately damaged more than 45,000 acres of land.

The state of Arizona, U.S. Forest Service, Bureau of Land Management and private landholders all managed parts of the damaged land.

Dickey immediately reported the fire and admitted to being responsible for it.

He agreed to a sentence of five years’ probation and will pay over $8 million in restitution, according to the news release.

He will also make a public service announcement with the U.S. Forest Service concerning fire safety.

Follow @KTAR923