The One Direction singer, 21, donned a khaki jumpsuit and a pair of dark shades in a bid to look like Tom’s character Maverick for the party, which was held at Clutch Kitchen in east London to celebrate the 30th birthday of TV presenter Laura Whitmore.
However, the singer wasn’t the only famous face to turn up to the bash, with other stars attempting to out-do his pilot fancy dress outfit.
The birthday girl dressed up as pop sensation Madonna for the eighties-themed celebration, wearing a trendy black crop top, leather jacket, fishnet gloves and a long string of pearls.
Niall’s attendance should come as no surprise as the pair have become close since his band’s rise to fame, although Laura has previously denied any romance between them.
Speaking in April last year, she admitted she was sick of people asking if they were in a relationship as he is ”just a child.”
She said: ”I’d rather you actually asked me about somebody else other than Niall, to be honest. I was never seeing Niall. He’s a child. The most embarrassing thing about that is that people thought we were together. I love Niall, he’s lovely but I’m 28.”
Elsewhere at the party, model Daisy Lowe wrapped up in a baby pink faux-fur coat while Stereophonics frontman didn’t make much of an effort with his outfit as he wore a casual look.
Other guests invited to birthday bash included Rizzle Kicks musician Jordan Stephens, actor Jeremy Piven, and The Saturdays star Vanessa White.