Megan Fox has confirmed she used to date her 'Transformers' co-star Shia LaBeouf.

Megan Fox

Megan Fox

The 32-year-old actress enjoyed a "romantic relationship" with the 'Nymphomaniac' actor while shooting the 2007 and its 2009 sequel, 'Transformers: Revenge of the Fallen', but insisted it didn't last beyond their work on the franchise, from which she was fired for making negative comments about director Michael Bay.

She said during a game of 'Plead the Fifth' on 'Watch What Happens Live With Andy Cohen': "I mean I would confirm that it was romantic. I love him, I have never been really quiet about that, I love him."

Asked if it was an on-set romance that didn't go anywhere afterwards, she said: "Yeah."

Megan also confessed to ruining the walls of her house when she got into a fight with husband Brian Austin Green.

Asked about previous comments that she'd destroyed the house during a row, she said: "I think I was being a little... that was hyperbole a little bit.

"I did one time get really angry at him and wrote in Sharpie a bunch of Nietzsche poems on his wall."

Megan's confirmation of her relationship with Shia comes after he hinted in 2011 they had been more than just co-stars while working on the action franchise.

He previously said: "Look, you're on the set for six months, with someone who's rooting to be attracted to you, and you're rooting to be attracted to them.

"I never understood the separation of work and life in that situation. But the time I spent with Megan was our own thing.

"I think you can see the chemistry on screen."

Megan and Brian - who have sons Noah, five, Bodhi, four, and Journey, two, together - got engaged in November 2006 after two years of dating but split in February 2009, reconciling a year later and marrying in June 2010. The 'New Girl' actress filed for divorce in 2015, but later announced she was pregnant with their third child and they had reconciled by the following year.