The decision that would launch one of the most intense and improbable negotiations in the history of U.S.-China relations was made in the space of hours — and it was sparked by a series of phone calls to the American Embassy.

Chen Guangcheng, the blind Chinese dissident, was somewhere in the sprawling edges of Beijing on Wednesday, April 25. His foot was broken in several places from a daring getaway from house arrest three days earlier, and his leg was beginning to swell. According to the activists who placed the initial calls, he was moving from place to place to avoid detection.

He was pleading for shelter.

The request hit the embassy like a rocket, setting off a flurry of secure calls among officials in Beijing and senior State Department officials in Washington. They weighed various scenarios, the possible diplomatic fallout with the Chinese, and the consequences for high-level meetings planned for the following week between Secretary of State Hillary Rodham Clinton and China’s top leaders.

The name Fang Lizhi quickly came up. The last Chinese dissident U.S. officials were known to have ushered into the embassy, in 1989, Fang had remained stuck behind its walls for more than a year, exacerbating friction between the United States and China.

With Chen, the embassy had been told there was a narrow window of opportunity because of his need to keep moving. Senior White House officials were briefed. Then Clinton relayed her ultimate decision to the embassy: Bring him in.

Talks with the Chinese began four days later.

“When we proceeded, we did it with clear eyes about what we were getting into,” said a senior administration official involved in the process, which culminated Saturday with Chen’s arrival in the United States.

For weeks, U.S. officials have kept secret many of the sensitive details about their negotiations over Chen’s fate. But with the 40-year-old lawyer safely aboard a plane Saturday, senior administration officials described extensively for the first time their dealings with the Chinese — how they struck the first deal only to have it fall apart, and how the negotiations almost collapsed again.

The officials, all of whom spoke on the condition of anonymity, detailed their efforts in the midst of continuing criticism by Republicans and some human rights groups over their handling of the crisis. Those critics argue that U.S. officials were too trusting of the Chinese and failed to secure hard guarantees — assertions Obama administration officials refute.

Diplomacy with China is often complicated by its government’s opaque nature, layers of bureaucracy, rule by the Communist Party and sometimes puzzling decision-making process.

But those involved in the negotiations said the high-stakes talks over Chen offer a rare glimpse into how China’s leadership operates in real time — under considerable internal and external pressures.

The Chinese Embassy did not respond to requests for comment for this story.

Two unidentified men

The negotiation room at the Foreign Ministry compound in East Beijing was set up with two long tables, each with a microphone. Elaborate Chinese art hung on the walls.

The Americans were greeted at 10 a.m. on Sunday, April 29, by familiar faces from the ministry — chief among them Cui Tiankai, a diplomat they had dealt with countless times. But on either side of the Chinese diplomats were two men who did not introduce themselves and were not introduced by others.

Not until days later, with an initial deal in sight, did the Americans learn that one of them was a representative of China’s Ministry of State Security — a powerful branch in charge of foreign intelligence and counterintelligence operations. The other, the Americans later surmised, was from an unidentified branch of China’s intelligence apparatus.

On the U.S. side were six State Department officials, including Assistant Secretary Kurt Campbell, who had been brought from Washington; legal adviser Harold Koh, who happened to be in the country for a conference; and the U.S. ambassador to China, Gary Locke.

The Chinese officials — 10 in all — conferred periodically in quiet huddles, but in a show of discipline, almost none uttered a word to the Americans over the course of four days. Only Cui talked.

Many in the room had worked with Cui on numerous sensitive issues. The previous year, in fact, Cui had sat across from some of the same U.S. officials, negotiating a joint U.S.-China statement during President Hu Jintao’s last visit with Obama in Washington.

Later, in response to criticism that the Americans should have negotiated with higher-ranking officials, or with China’s powerful security branch, several U.S. officials would argue that it was not up to them to choose their negotiating partners.

Their hands were tied in other ways as well. The Chinese warned that if word leaked that Chen was at the embassy, they would respond by charging him with treason.

The first pitch

At that first meeting, the Americans proposed that the Chinese negotiate directly with Chen. Chen had made it clear in long conversations with U.S. officials that he wanted to stay in China so he could remain relevant.

If Chen planned to stay, U.S. officials reasoned, he would need to build trust with government authorities. Having Chinese officials see him in person would also confirm U.S. claims about Chen’s injuries.

But the Chinese rejected a meeting with Chen. Foreign Ministry officials refused to go to the U.S. Embassy to negotiate. And the Americans couldn’t bring Chen out without losing all leverage.

Over the course of the negotiations, the Chinese never put any proposals on the table. Their role was strictly reactive. At the end of each meeting, Cui would leave to report the latest terms to Chinese leaders. At times, he would enter the next meeting having come directly from the compound reserved for China’s highest leaders.

“We would put something forward, and were getting answers back almost immediately from the highest levels,” one senior administration official said. “I have never seen the Chinese government working this rapidly and efficiently.”

Meanwhile, the 12-hour time difference with Washington meant U.S. negotiators were getting little sleep, spending most of their night hours briefing the White House and State Department via secure lines at the embassy.

Negotiating with Chen could sometimes be as difficult as negotiating with Chinese officials. Conversations with him could be deeply moving. He often seemed fragile — a blind man with few possessions, sleeping in a small unadorned room in the barracks of the embassy. He talked of how much he missed his wife and worried about his children.

But he could pivot in an instant, displaying a steely shrewdness as he detailed the demands he wanted conveyed to Chinese officials.

Timing as leverage

U.S. officials say they soon came to realize that Clinton’s impending visit to Beijing might actually play in their favor.

Chinese negotiators had made clear they had a strong desire to resolve the issue before the upcoming Strategic and Economic Dialogue, scheduled to begin May 3.

If negotiators didn’t succeed in resolving the matter before Clinton’s arrival, the crisis could escalate, drawing in higher-ranking officials. It was one thing for career diplomats to privately hash it out in a room; it would be quite another for Clinton to address the issue directly in meetings with China’s leadership. It was clear the Chinese negotiators wanted to avoid that.

As one senior administration official put it: “At end of the day, having Hillary Clinton come in and put things very directly and say this is what we’re seeking . . . is of a different character than having a team of negotiators say it.”

The breakthrough came on the fourth day, when the Chinese agreed to bring Chen’s family to Beijing by high-speed train. It was the sign of good faith that Chen had been seeking — his wife and two children would be out of reach of the local authorities in Shandong province — and although Chen hesitated a few more times, it was his family’s safety that persuaded him to finalize a deal.

U.S. officials had gotten agreement from the Chinese that Chen would stay at a hospital for two weeks, then relocate immediately to one of seven universities, most likely the one in nearby Tianjin. After about two years in Tianjin, Chen would be able to study in the United States or, if he preferred, transfer to a New York University-sponsored program in Shanghai.

If all went according to plan, Clinton would be able to announce the terms of the agreement to the news media at the end of the upcoming conference.

A few hours after Clinton’s plane landed on Wednesday, May 2, Chen agreed to leave the embassy and reunite with his family at the hospital.

Ambassador Locke asked Chen three times whether he was sure about leaving the embassy and accepting the deal to stay in China. Chen told Locke he was ready to make a better life for himself.

A misstep

U.S. officials had negotiated maintaining access to Chen while he was at the hospital. But on the evening Chen reunited with his family, the last official remaining decided to leave, out of a sense that they desired some privacy.

It was a decision that would be endlessly scrutinized and criticized in coming days, by Chen’s supporters, by Republican lawmakers and by human rights advocates — a decision even some U.S. officials would later acknowledge was a mistake.

The Americans had provided Chen with three preprogrammed cellphones to ensure access, but they did not anticipate that he would use them in a nonstop stream of interviews over the next two days — even calling in to a congressional hearing in Washington.

Chen began telling friends and anyone he could reach that he had been abandoned and feared for his safety. Supporters and reporters descended on the hospital, prompting a crackdown by security guards.

Suddenly, the Chinese Foreign Ministry broke its silence on the case, issuing a statement in which it lambasted U.S. interference and demanded an apology.

To many outside the government, it appeared as if the Chinese were annulling the deal. But many U.S. officials who were there say that the Chinese appeared willing to follow through on the deal and would have, if Chen hadn’t changed his mind.

“To this moment there is no aspect of those understandings that they didn’t fulfill,” said one senior U.S. official, noting that the Chinese had kept their promise to open an investigation into the abuse Chen suffered and allowed him to communicate freely.

The closing pitch

By the morning of Thursday, May 3, in Beijing, it was clear there was a problem: Chen wanted to leave China.

U.S. officials realized they had underestimated the animosity of Chen’s friends and fellow dissidents toward his decision to stay, and overnight as he sat alone with his family, they had clearly persuaded him to reconsider.

By then, the conference was in full swing, and any negotiations would have to take place in the short breaks between sessions.

For the first time, U.S. officials floated the idea of Chen going to the United States. With the situation rapidly falling apart, they suggested it was the quickest path to resolution. At an afternoon meeting, Cui appeared angry as he listened to the proposal but left to convey the message to his leaders.

That night, after a full day at the conference, Clinton gave her tired and dispirited negotiating team a pep talk. They weighed the options, including allowing for a cooling-off period. But ultimately, Clinton called for a full-court press to reach an immediate solution.

Hours later, Campbell contacted Cui to tell him they needed another meeting in the morning.

Cui responded heatedly, his voice so loud it could be heard by others in the room with Campbell: “We did this once already!”

By morning, Clinton decided to raise the stakes and meet directly with Dai Bingguo, China’s senior foreign policy official. A sit-down was scheduled for 9 a.m.

Clinton opened with praise for both sides’ negotiators and their original agreement. Then she carefully framed the new proposal in terms of the first deal.

The plan all along had been for Chen to be able to study in the United States after his two years in Tianjin, she pointed out. All the United States was asking for was to move up that timetable.

She described the moment in lofty terms — as an inflection point in history that could have enormous bearing on future relations between the two countries.

Dai sat very still and, when he spoke, did so almost in a whisper.

China has done all it can, he said. He hesitated, then added that if the Americans believed more was possible, the negotiating teams could sit down again.

“I don’t want to talk to him anymore,” Cui blurted out in Chinese, gesturing toward Campbell.

Dai told Cui to try once more.

“We go out uncertain what to expect,” one official said. “What we’re waiting for is a signal.”

Breach of protocol

A glimmer of hope came not long afterward, at Clinton’s meeting with Premier Wen Jiabao.

In the middle of the meeting, as Wen and Clinton were talking, a junior Chinese officer stood up from the table and pulled Cui, China’s ambassador to Washington, Zhang Yesui, and their lieutenants from the meeting — an extraordinary breach of typical protocol.

Behind a large wall, the Chinese officials held an animated deliberation. When the officials returned to their seats, they appeared tense but slightly more confident.

After the meeting, one of them pulled Campbell aside. “Are you certain this is what he wants?” the official asked.

“We’re absolutely certain,” Campbell replied.

During a lunch break, as the State Department’s Victoria Nuland briefed reporters, a journalist handed her a BlackBerry with a news alert from Xinhua, China’s official news agency.

Chinese officials had declared that, as a Chinese citizen, Chen was free to apply to study abroad. Whether it signaled that the Chinese had fully committed to letting him go — or were simply stalling — remained unclear.

Shortly afterward, Cui met again with Campbell and three other Americans.

For a full hour, he harped on the issue of U.S. interference. Shortly afterward, Cui made his first mention of the Xinhua story.

“That’s when we knew it was a deliberate move,” one U.S. official said.

The Chinese laid out their demands. They wanted to make clear publicly that Chen was receiving no special treatment, and they needed an undefined period of time before releasing him so it did not appear as if they were caving in to outside pressure.

Most of all, they insisted the agreement was to be presented as a series of parallel and separate undertakings on both sides, not as a “deal,” or even as an “understanding.”

Cui departed with a final warning to the Americans: Don’t say anything that would force us to contradict you.

A last-minute statement

The meeting left the Americans 20 minutes before Clinton was to address reporters.

At least seven senior U.S. officials gathered around a computer to cobble together a statement.

At the news conference, as Cui had been promised, Clinton spoke in positive but general terms. Her spokeswoman released a statement describing U.S. expectations “that the Chinese Government will expeditiously process his applications” for travel documents.

After six days of nearly nonstop crisis diplomacy, there was nothing left to do but wait for word from the Chinese.

It came 15 days later, as Chen was whisked from his hospital and put on a plane to Newark.