The epicentre of the earthquake was in India's mountainous Sikkim state, where at least 18 people were killed.
Rain and landslides are hindering search and rescue operations there and officials in Sikkim fear that the toll could rise further.
Several earthquakes hit the region this year, but none caused major damage.
At least five people were killed in Nepal, police there say, and at least seven died in Tibet, China's official Xinhua news agency reported. At least six other people were killed in other Indian states.
Officials in all regions say the death toll is likely to rise as rescuers reach the remote mountainous areas struck by the quake.Power cuts
The quake struck the mountainous north-eastern Indian state of Sikkim at 18:10 (12:40 GMT) on Sunday, according to the US Geological Survey, and was followed by two strong aftershocks.
Telephone lines were knocked out across the state, while power cuts plunged Gangtok, the capital, into darkness just seconds after the quake hit.
Hundreds of people there spent the night on the streets after buildings developed cracks, reports say.
Tremors were felt in the north-eastern Indian states of Assam, Meghalaya, and Tripura. They were also felt in regions of India: West Bengal, Bihar, Jharkhand, Uttar Pradesh, Rajasthan, Chandigarh and Delhi. Bangladesh and Bhutan also felt the quake.
One person was killed during a stampede as people panicked in a town in the eastern state of Bihar, and other deaths were reported near Darjeeling, in West Bengal.
Landslides have blocked the two main highways linking Sikkim with the rest of the country making it difficult for the rescue workers to reach the area, reports say.Buildings evacuated
Just over the border in Tibet's Yadong County, just 40km (miles) from Sikkim, the earthquake caused hundreds of landslides disrupting traffic, telecommunications, power and water supplies.
Chinese authorities said relief supplies were on the way to the area.
In Kathmandu, 270km (170 miles) west of the quake's epicentre, buildings were evacuated and traffic came to a standstill.
Three people died when a wall of the British Embassy collapsed. Those dead included a motorcyclist and his eight-year-old child who were struck as they rode past, police said.
Two others died in Dharan in Sunsari district, including a five-year-old child, according to the the Himalayan Times newspaper.
Lawmakers in parliament hurried out of the building shouting when the quake struck in the middle of a debate on the budget, witnesses said.