A bus carrying North Macedonians home from a tourist trip to Istanbul crashed and caught fire in western Bulgaria early on Tuesday, killing at least 45 people, authorities and local media said.

The accident happened around 2am and there were children among the victims, authorities said.

Seven people were taken to hospitals for treatment.

The cause of the crash was not immediately confirmed, but it appeared that the bus hit a guard rail, crashed and caught fire.

The bus was one of four travelling together.

Officials said an investigation will be launched.

Bulgarian news agency Novinite said representatives from Macedonia's embassy visited a hospital where some of the victims were taken.

Photos taken shortly after the crash showed the bus engulfed in flames with plumes of thick, black smoke rising from the scene. 

Caretaker Prime Minister Stefan Yanev visited the site of the crash and told reporters it was "a huge tragedy".

Mr Yanev said: "I take this opportunity to send my condolences to the relatives of the victims. Let's hope we learn lessons from this tragic incident and we can prevent such incidents in the future."

Albanian foreign minister Olta Xhacka wrote online that almost all of those who died in the crash were ethnic Albanians.

North Macedonian Prime Minister Zoran Zaev told Bulgarian television channel bTV that he had spoken to one of the bus survivors.

"One of the passengers told me that he was asleep and woke up from an explosion," Mr Zaev told bTV, adding that the authorities will gather information that is "important for the families of the dead and the survivors".

In a statement posted online, North Macedonian President Stevo Pendarovski called it a "horrific accident" and said that he expects the authorities to conduct a full investigation to determine the "causes and responsibility for the tragedy".

Oliver Varhelyi, a European Union Commissioner, sent his condolences to the families and friends of those affected by the crash.

"Terrible news about the tragic bus accident in Bulgaria in early morning hours," Mr Varhelyi wrote online.

"My thoughts & condolences are with the families and friends of those who died as well as with the people and the authorities of North Macedonia."