

BEIJING — An ethereal dawn mist cloaked the Temple of Heaven as Mayor Martin J. Walsh climbed ornate marble steps worn smooth by centuries of footsteps.
Ascending the final stair, Walsh took in the vista: A soaring, conical shrine roofed with cornflower-blue bamboo tiles meant to invoke the deepest blue sky. A screeching flock of swallows circled the temple, which was a sacrificial altar for emperors of the Ming and Qing dynasties, built 50 years before Christopher Columbus sailed for the New World.
“This is China,’’ Walsh said, spreading his arms to envelop an expanse that included a 500-year-old juniper tree nicknamed “nine dragon.’’
In his whirlwind 44 hours in Beijing this week, the mayor actually saw little of China beyond his hotel and the attached conference center, where he attended a summit on climate change. Walsh did not have time to wander the Forbidden City, explore the old world alleys of the Hutong neighborhoods, or make the hour drive to the Great Wall of China.
Walsh’s itinerary did not give him the time to sample the raucous restaurants on Ghost Street, so he ate most meals in the hotel, supplemented by peanut butter crackers and a turkey sandwich he smuggled from Dorchester. He devoured rice and especially noodles at breakfast, and sat at the head table at a seven-course state dinner, where he sampled dumplings and red bean sauce and mushroom soup.
“I tried using chopsticks on the plane,’’ Walsh said, recalling the 14-hour Boston-to-Beijing flight on Hainan Airlines. “I wasn’t too successful.’’
The mayor made one other brief excursion as a tourist, when a State Department security team drove him to Tiananmen Square, where he squinted in the smog as he posed for the requisite iPhone photograph in front of the portrait of Mao Zedong. Walsh marveled at the police presence and the aggressive street sweepers who seemed to catch scraps of paper before they could hit the ground.
“I would have liked to see some of the other sites in China, obviously,’’ Walsh said. “You don’t come to China all that often.’’
The trip, paid for by the private foundation Bloomberg Philanthropies, was an effort to build bonds between urban leaders in the United States and China as they work to reduce greenhouse gas emissions and reverse climate change. Walsh attended a summit that took so much of his time, he never needed to obtain the local currency, known as renminbi or Chinese yuan. (He did use his credit card, he said.)
Even cloistered in the hotel, Walsh encountered Chinese culture. The mayor, for example, followed local etiquette with business cards, which he exchanged with Chinese officials, mindful to hold each with two hands as a sign of respect.
He held a press conference with two dozen members of the Chinese media. Working with a translator, Walsh took questions about Boston’s efforts to curb carbon emissions and steps that can be adopted by cities in China.
Walsh told reporters about cleaning up Boston Harbor, changing old-fashioned street lights to energy-efficient LEDs, and moving heating and cooling systems to the roofs of new buildings to prepare for rising seas. Recounting Boston’s record-breaking winter, he was conscientious enough to quantify the impact using the metric system.
“Last year, we were hit with about 3 meters of snow,’’ Walsh said. “It was probably a direct result of climate change.’’
Speaking with Chinese officials, Walsh learned that traffic remains one of the most intractable problems in urban China. They told him that rising health care costs have been a driving force behind the push to curb emissions because pollution can cause asthma, cancer, and other ills.
“It is amazing that climate change could bring the nations closer together,’’ Walsh said, adding, “The United States and China . . . might disagree politically on certain things internationally, but certainly around the environment it seems like there is a lot of common area. It’s a good place to build strong relationships.’’
He left the hotel at 6 a.m. for a tour of the Temple of Heaven, a few hours before his flight. Walsh joined mayors from St. Paul, Dubuque, Iowa, and other cities. Phoenix Mayor Greg Stanton stepped into a stone circle to test the famous echo on the temple grounds, saying, “Bring me rain.’’
Walsh followed suit and quipped, “Bring me good press.’’
The delegation broke out in laughter.
Hours later at Beijing Capital International Airport, Walsh picked up a copy of the English-language China Daily. He found his own picture on Page 3 with US Secretary of State John F. Kerry, who made an appearance at the climate summit.
The flight home had no Wi-Fi, leaving Walsh disconnected as he flew over Siberia, the Arctic Circle, and Hudson Bay.
Walsh had left his schedule free Wednesday afternoon to recover from the jet lag of the 12-hour time difference. But when he landed, his phone buzzed with news: A gunman had shot and killed a 17-year-old student outside Jeremiah Burke High School.
Police met him at the airport and whisked the mayor to the scene.
Andrew Ryan can be reached at andrew.ryan@globe.com Follow him on Twitter @globeandrewryan.