Two boaters and their two dogs were rescued from the Great South Bay when their vessel caught fire, officials said.

The boaters, a married couple from Newburgh, jumped into the water as they were leaving from Barrett Beach, just east of Fire Island Pines, when their 30-foot boat began heating up, Suffolk County police said in a statement. The couple, a 41-year-old man and a 45-year-old woman, were wearing life jackets, as were their dogs.

They were in the water for about 15 minutes before a 70-year-old Lindenhurst man spotted them and helped them onto his 38-foot Tiara boat, police said. No one was hurt.

The boat, believed to be a pleasure cruiser, sank about 2 miles off Barrett Beach after police and fire departments doused the flames, according to Kyle Merker, second chief of the Fire Island Pines Fire Department.

advertisement | advertise on newsday

The Fire Island Pines Fire Department was dispatched to the blaze at 5:33 p.m., Merker said.

The Coast Guard, Suffolk County police, and firefighters from Fire Island Pines, East Islip, Sayville and Hagerman responded, Merker said.