July 1, 2020 | 11:09pm

A California man who contracted the coronavirus after attending a party posted a haunting warning on Facebook the day before he died.

Tommy Macias, 51, began to show symptoms a week after attending a party in early June in Lake Elsinore, about 70 miles outside of Los Angeles, NBC News reported.

On June 20, he penned the tragic message in which he expressed regret for failing to follow social distancing measures and mask-wearing guidelines and for putting his family at risk.

“Because of my stupidity, I put my mom and sisters’ and my family’s health in jeopardy. This has been a very painful experience,” he wrote.

“This is no joke. If you have to go out wear a mask and practice social distancing.”

Macias, a truck driver, added, “Hopefully with God’s help I’ll be able to survive this.”

An official from the Riverside County Office of Vital Records told NBC News on that Macias died from COVID-19 the following day.

Macias had tried to strictly follow the state’s shelter-in-place order between late March and early June because he was at risk with diabetes, Gustavo Lopez, his brother-in-law, told Yahoo News.

But Macias decided to attend the party after Gov. Gavin Newsom signaled he’d be loosening coronavirus restrictions, the outlet reported.

“He was quarantining because he was overweight and had diabetes,” Lopez said.

After the soiree, one of Macias’ friends contacted him to let him know he had tested positive for the coronavirus — and that he knew of his positive diagnosis when he attended the party, Lopez told Yahoo.

But the friend falsely believed that because he didn’t feel any symptoms, he couldn’t transmit the virus to others.

Lopez said he knew of more than a dozen people contracted COVID-19 after attending the party.

Macias was transported to a local hospital at about 11 a.m. on June 2 and placed on a ventilator roughly between 6 p.m. and 7 p.m. before he passed away around 9 p.m., Lopez said.

“He would do anything for everybody,” Lopez told Yahoo. “No questions asked.”