Secretary of State Antony J. Blinken met with Xi Jinping, China’s leader, on Monday in Beijing, as the two governments sought to pull relations out of a deep freeze that has raised global concerns about the growing risk of a conflict between them.

The 35-minute meeting sent a signal, at least for now, that the United States and China do not want their relationship to be defined by open hostility, and that they recognize that their rivalry and their diplomatic efforts carry enormous stakes.

Mr. Blinken and Mr. Xi held talks at the Great Hall of the People, the grand building on the west side of Tiananmen Square where Mr. Xi often receives state leaders. Striking a congenial note at the top of the meeting, Mr. Xi praised the two sides for making progress on some issues during Mr. Blinken’s visit, saying: “This is very good.”

Mr. Blinken told Mr. Xi that the American government was committed to responsibly managing its relations with China, according to a State Department statement. “It’s in the interest of the United States, in the interests of China, and in the interest of the world,” he said.

Both Mr. Xi and President Biden have been under growing pressure by other world leaders to tamp down their nations’ increasingly contentious stances toward each other. Any armed conflict between the United States and China, whether over Taiwan, the de facto independent island that Beijing claims as its territory, or another dispute, is widely regarded as potentially cataclysmic. The United States and China are the world’s two largest economies, are nuclear powers and are the dominant players in advanced technologies and other critical industries.

Officials in Washington and Beijing increasingly speak of the need to halt the rapid decline in relations. But even as they engage in high-level diplomacy aimed at some sort of détente, the two governments also see the need to demonstrate that they are not compromising on core issues.

In his opening remarks at the meeting with Mr. Blinken, Mr. Xi hinted at China’s grievances, saying: “State-to-state interactions should always be based on mutual respect and sincerity. I hope that through this visit, Mr. Secretary, you will make more positive contributions to stabilizing China-U.S. relations.”

Over the two days of meetings, diplomats did not voice any hope for sudden or dramatic breakthroughs in repairing the relationship. Instead, they focused on trying to rebuild channels of communication that had crumbled in recent months and on bolstering negotiations on smaller issues, such as visas and commercial flights between the two countries.

Mr. Blinken held talks on Monday morning with Wang Yi, China’s top foreign policy official, who took a tough tone as he lay the blame on Washington for the recent tensions.

Mr. Wang said the United States should cooperate with Beijing instead of “hyping” the “China threat theory,” according to an official Chinese readout. He said Washington must lift sanctions on China and stop suppressing the country’s technological development. He accused the United States of “recklessly interfering in China’s internal affairs” on issues such as Taiwan, which the United States supplies with weapons.

The State Department described Mr. Blinken’s meeting with Mr. Wang as “candid and productive,” saying that Mr. Blinken stressed that the two powers had to responsibly manage their rivalry and communicate better to “ensure competition does not veer into conflict.” It also said the two officials discussed how their countries could cooperate on “shared transnational challenges.” American officials say those challenges include climate change, global economic instability and the control of the production of fentanyl, the deadly opioid.

Mr. Blinken, who also met with Qin Gang, the Chinese foreign minister, on Sunday, is the first American secretary of state to visit Beijing since 2018. His mission is taking place as bilateral relations have plummeted over a half-dozen years to their lowest point in decades. Tensions soared in February when the Pentagon announced that a Chinese surveillance balloon was drifting across the continental United States — prompting Mr. Blinken to cancel an imminent trip to Beijing — and then ordered American fighter jets to shoot it down.

Relations were further strained in late February when Mr. Blinken confronted Mr. Wang on the sidelines of the Munich Security Conference to tell him that Washington believed China was considering providing lethal support to Russia for its war in Ukraine. China responded by freezing some important diplomatic exchanges and intensifying anti-American rhetoric.

Republican politicians have tried to portray the Biden administration as being soft on China, even though Mr. Biden and his aides have enacted tough commercial policies such as export controls to try to limit China’s growth in strategic sectors, notably semiconductors, and have strengthened military cooperation with countries across Asia. Some Republican lawmakers have even criticized Mr. Blinken for making his trip to China, saying it amounted to a concession to Beijing. The heated language on China among U.S. politicians is expected to intensify next year, when Mr. Biden seeks re-election.

U.S. officials say maintaining regular senior-level dialogue is important so that the two governments can quickly talk with each other during any crises that might arise, especially since their militaries are increasingly coming into close contact with each other in the seas and in the air around China and other parts of Asia.

Wu Xinbo, dean of international studies at Fudan University in Shanghai, said that recent remarks by Mr. Biden downplaying the severity of the balloon incident likely helped pave the way for Mr. Blinken’s visit. “I think China feels that the U.S. is now taking a constructive position,” he said.

Officials on both sides have said Mr. Blinken’s meetings would ideally lead to a series of visits soon to the Chinese capital by other senior American officials, including Janet Yellen, the treasury secretary, Gina Raimondo, the commerce secretary, and John Kerry, the special presidential envoy on climate issues.

State Department officials said that during Mr. Blinken’s visit, the two governments agreed to have working groups and diplomats meet soon on a range of issues, including increased access to each country for journalists, scholars and students. The officials also said the two sides agreed to expand direct commercial flights between the two nations.

The visit by Mr. Blinken may stem the deterioration in ties for now, though analysts say it will take much more for the two sides to overcome the mistrust that weighs on the relationship.

The hope is that the talks in Beijing spur the two governments to “shape a principled framework for managing U.S.-China relations, in order to bound the competition within acceptable limits and create more space for coordinated efforts where American and Chinese interests overlap,” said Jessica Chen Weiss, a political scientist at Cornell University who recently advised the State Department on China policy.

China has rebuffed attempts by the Biden administration to establish so-called guardrails to prevent potential accidents in contested areas like the Taiwan Strait and South China Sea from spiraling out of control. Analysts say some Chinese officials view any perception by the Americans that the Chinese government and its military can be unpredictable as itself a useful deterrent. The thinking goes that the perception might lead U.S. officials to reconsider their military’s activities in the waters and skies around China.

In the days and weeks leading up to Mr. Blinken’s visit, China repeatedly criticized the United States for lacking “sincerity” by calling for communication while continuing to trammel Chinese interests. For high-level talks to resume, China said, the United States needed to respect Beijing’s positions.

Mr. Xi’s decision to meet with Mr. Blinken, however, indicated that China was also uncomfortable with the escalation in tensions.

“Despite Chinese efforts to make it appear as though the U.S. side is more eager for the visit, the Chinese side has also placed significant importance in Blinken’s visit and in bringing greater stability to U.S.-China relations,” said Paul Haenle, a director for China on the National Security Council under the Bush and Obama administrations.

Pressure may be mounting on Beijing to stabilize ties because of China’s worsening economy. Mr. Xi may also want to steady the relationship because he appears eager to cast himself as a global statesman. And he and Mr. Biden could meet one-on-one in San Francisco in November if he chooses to attend a leaders’ summit of the Asia-Pacific Economic Cooperation group of nations.

“China has spent the past several months blaming the United States for all that is wrong in the relationship and inside China more broadly. Now, China’s leaders need to carve out political space to pivot toward more direct communication,” said Ryan Hass, a senior fellow at the Brookings Institution who was a China director at the National Security Council under President Obama.

“Beijing sees it as in its interest to communicate directly to manage stresses in the relationship,” he added, “and build an on-ramp for President Xi to meet with President Biden in the fall.”

Olivia Wang contributed reporting.