BEIJING — China and the United States made common cause on Wednesday against the threat of climate change, staking out an ambitious joint plan to curb carbon emissions as a way to spur nations around the world to make their own cuts in greenhouse gases.

The landmark agreement, jointly announced here by President Obama and President Xi Jinping, includes new targets for carbon emissions reductions by the United States and a first-ever commitment by China to stop its emissions from growing by 2030.

Administration officials said the agreement, which was worked out quietly between the United States and China over nine months and included a letter from Mr. Obama to Mr. Xi proposing a joint approach, could galvanize efforts to negotiate a new global climate agreement by 2015.

It was the signature achievement of an unexpectedly productive two days of meetings between the leaders. Mr. Obama and Mr. Xi also agreed to a military accord designed to avert clashes between Chinese and American planes and warships in the tense waters off the Chinese coast, as well as an understanding to cut tariffs for technology products.