Katherine Heigl used John Mayer to convince her husband to commit to her.

The 'State of Affairs' star - who has been married to Josh Kelley since December 2009 - has admitted that she threatened her now-husband to commit to her or lose her to John.

She explained: ''Around the same time I met Josh, I also met John Mayer. John Mayer and I are from neighbouring towns and knew some of the same people.

''My Josh had gone off on tour and was playing hard to get. So I didn't know - are we a thing? Are we a couple?''

The 35-year-old actress - who admitted that her relationship with John was always only ever platonic - revealed that she kept the secret from Josh until they had been married for a year.

Speaking on 'The Meredith Vieira Show', she said: ''These musicians, they are competitive and jealous of each other. [So] over the phone, because he was on tour, I was like, 'Josh, I've got to be honest. I just want to know where we stand because if not, I might try to pursue something with John.'

''[I confessed] probably a year into our marriage. I was like, 'You got played!'''

The couple - who first met in 2005 when Katherine played his love interest in the music video for 'Only You' - have two children together: Naleigh, 5, and 2-year-old Adalaide.