Jesse Tyler Ferguson's father found out he was gay at the age of 14 after he discovered his stash of gay porn.

The 'Modern Family' star, 38, was just a teenager when his dad Robert learned he was homosexual after he was caught stealing the explicit material from a shop.

Speaking on Aisha Tyler's podcast, 'Girl on Guy,' he said: ''I was caught stealing gay porn when I was 14.''

He added: ''I had to go back [to the shop] and the woman asked me if I had anything in my backpack.

''She was giving me the benefit of the doubt ... she took me to the back room. They brought my dad in, and they showed him the nature of the material I was stealing, and it was really, really humiliating. So I always consider that my coming-out process.''

However, Jesse's father still took a while to come to terms with his son's sexuality.

Jesse explained: ''[He] was like, 'Okay, are you gay?' And I was, like, 14. I didn't really know. I didn't know what I was going through. But then in my later teen years I did come out to him, and it was like he needed to be told three times ...

''[When I was 21] he asked me if I had a girlfriend at the time, and I was like, 'Dad! You know I'm gay, right?' ''

Jesse married his lawyer beau Justin Mikita in July last year in New York and his family - including Robert - were supportive of the couple's nuptials.