The fire is said to be small and all passengers were evacuated safely. (Representational)

A Virgin Atlantic flight en route London from New York made an emergency landing in Boston after a small fire broke out in the first class cabin on Thursday night.

All 217 passengers on board were evacuated safely, CNN reported while quoting the Massachusetts State Police. The flames may have come from an electrical malfunction from a passenger seat.

28-year-old Cory Tanner, who was onboard the flight, told CNN that they could smell smoke coming from the first class cabin "not even 30 minutes" after the plane took off from the John F. Kennedy International Airport on Thursday evening. He added that a flight attendant told him that a TV unit in the first class cabin had caught fire.

Virgin Atlantic Airways, in a statement, said that an incident onboard the flight led to the diversion. No details have been given on the reason behind the fire.

"Our cabin crew are trained to a high standard and acted quickly to deal with this situation," the airline said.