Things were going well for Australian triathlete Mirinda Carfrae as she competed in a bike race from the confines of her home in Boulder, Colo.

Suddenly, Carfrae, a former triathlon world champion, was no longer second in the inaugural Ironman VR Pro Challenge women’s race, which was being broadcast live on Facebook. The culprit? She believed she hadn’t firmly plugged her bike into the wall outlet.

Alas, the explanation for the electrical failure lay elsewhere.

Her husband, triathlete Tim O’Donnell, confessed he had tripped over the cord when he entered the room and moved behind her to hold up cards for the camera.

“He decided to bring my trophies in here as motivation, and when he walked around the back, he kicked out the plug,” she said with a laugh on her Instagram story. “What an idiot!”

She kept pedaling in the 55-mile race anyway and later held up a sign that read, “It’s Tim’s fault.”

Carfrae vowed she won’t be seeking retribution.

“Tim is racing next weekend, and I won’t pull his cord out,” she said.

Jocelyn McCauley of the United States won the race, with Canada’s Angela Naeth and South Africa’s Jeanni Seymour finishing second and third.

More from The Post: