• China’s capital beat Almaty in Kazakhstan by four votes • Promises from Chinese president of an excellent Games

Beijing celebrated winning the right to host the 2022 Winter Olympics on Friday night, insisting it had the energy and the resources to stage a dazzling event despite concerns over a lack of snow in the region.

Chinese officials and athletes leapt into the air and broke down on national television after it was announced Beijing had defeated Almaty by the tightest of margins: 44 votes to 40.

The International Olympic Committee’s decision means China’s capital will become the first city to host the summer and winter events.

“I am so excited,” Wang Beixing, a Chinese speed skater and Olympic medallist, told the state broadcaster CCTV after the IOC president, Thomas Bach, broke the news. “My tears cannot hold in there,” she added, pointing to her eyes. “I am really happy.”

There was a muted reaction in Beijing itself but residents of Zhangjiakou – a city around 125 miles from Beijing that will co-host the Games – danced in the streets. “We are all very happy. The whole county is going wild with joy,” said Zheng Xiaolong, 27, who works in the tourism industry selling tickets to a ski resort. “People are cheering and lighting firecrackers to celebrate the good news.”

China’s victory capped a dramatic final day of campaigning in Kuala Lumpur, which almost ended in farce when the IOC’s electronic voting system malfunctioned and its 85 voting members had to cast written ballots.

In its final offensive, China had enlisted one of the most powerful men on earth, attempting to wow the IOC committee with a one-minute video message from the country’s president, Xi Jinping.

“The Chinese people are looking forward to this opportunity. Let me assure you that if you choose Beijing the Chinese people will present to the world a fantastic, extraordinary and excellent Olympic Winter Games in Beijing,” he said, sat before a painting of the Great Wall of China.

The mayor of Beijing, Wang Anshun, vowed to take urgent steps to counter his city’s smog problem and promised to put on “Games that are joyful and harmonious, Games that are safe and reliable”.

Kazakhstan had sought to capitalise on what many had seen as Beijing’s achilles heel – a shortage of snow. The slogan for the Almaty 2022 bid – “Keeping it real” – was a not-so-subtle swipe at China’s promise to compensate with artificial snow.

“Real snow, real winter ambience, real winter games,” boasted a promotional video produced by Kazakhstan’s Foreign Ministry.

Susan Brownell, an expert in Chinese sports who has been travelling to the country since the 1980s, said the dearth of snow around Beijing was not an insurmountable problem for the cash-flush Communist party.

“You do have to laugh a little bit at the concept of a winter Games in a place that doesn’t get snow but I think they have the technology, the money and the manpower. They will solve it,” said Brownell, an anthropologist and former track and field athlete from the University of Missouri–St Louis.

Speaking before Beijing’s victory, Liu Peng, the president of the Chinese Olympic Committee, said. “Ski resorts have been operating in Zhangjiakou for decades. Beijing 2022 will build on its existing snow-making capability to supplement natural snowfall.”

Chinese authorities have also faced questions over the logistics of the Beijing Games. Almaty’s bid emphasised how all its events would be held within a 20-mile radius of the city. China’s Games will be spread between three locations: Beijing, Zhangjiakou and Yanqing, around 40 miles northwest of the capital. Liu Peng, the Chinese Olympic chief, said his country was a master of infrastructure building that would have no problem ferrying athletes and visitors between events. “In the past decade China has built the world’s largest high-speed rail network,” he said.

That network will soon grow further with the construction of a high-speed rail link between Beijing and Zhangjiakou that began last year and will be completed in 2019, according to Xinhua, China’s official news agency.

Brownell added the Beijing Games had the potential to create a vibrant winter sports hub in northern China.“People have underestimated a little bit the degree to which north-east Asia is a winter sport country. That hasn’t been well developed under the communists since 1949. But there were traditions of skating and skiing and I think with this growing ‘leisure class’ there is the potential to build up regular visitors to resorts, especially ones that aren’t too far from Beijing.”

Human rights activists reacted with bitter disappointment to Beijing’s victory. Both bidding countries have faced criticism over their human rights records but China is in the midst of a severe offensive against dissent that has seen scores of people detained or interrogated in recent weeks.

Sophie Richardson, the Human Rights Watch’s China director, said: “The Olympic motto of higher, faster, and stronger is a perfect description of the Chinese government’s assault on civil society: more peaceful activists detained in record time, subject to far harsher treatment. In choosing China to host another Games, the IOC has tripped on a major human rights hurdle.”

Hu Jia, a prominent dissident who has spent long periods under house arrest because of his activism, said the Communist party would view Beijing’s victory as a major political victory, “a jewel in Xi Jinping’s crown”.

He called on the IOC to “exert its influence on Beijing” in order to push for change. “The next seven years will be a very critical time for China and the Olympics will be a very good opportunity for the country to transform from an authoritarian regime to democracy.”

For his community, Zheng Xiaolong, from Zhangjiakou, said the Games would dramatically improve people’s lives. “Our county is a small county and many young people, after their graduation, need to find work in big cities like Beijing and Tianjin. The Olympics will bring many job opportunities here and the youngsters can stay and find good jobs,” he said. “I’m sure they will build more schools, hospitals and even an airport here.”

Nor was he worried about the snow. “Snow is not a problem. We have a reservoir here to supply water to make snow. Last year we had more than 150 days of it.”

Additional reporting by Luna Lin