July 23, 2014 4:29 p.m. ET
As attempts to retrieve the bodies and flight recorders from Malaysia Airlines Flight 17 dragged on over the weekend, Prime Minister Najib Razak risked a gambit that European leaders wouldn’t: sending officials into a war zone to meet with armed rebels whose government almost no one recognizes.
After a nervy journey through checkpoints that dot eastern Ukraine’s conflict zone, the team met separatist leaders in their stronghold of Donetsk, who handed over the flight recorders—known as black boxes—and released the bodies for repatriation via Ukrainian government-held territory.
While European governments wrestled with how to get to the site without legitimizing the rebels or risking security, Mr. Najib put aside diplomatic protocol and safety fears and sent his team.
“What was key to him was the outcome,” said a person close to the prime minister’s office. “He was looking at people who controlled an area of land. And on that land was our plane, our bodies, our black boxes.”
The mission’s success delivered a political victory for Mr. Najib’s government, still reeling from its missteps after the disappearance of another Malaysia Airlines flight in March with 239 aboard.
But it also handed a gift to the rebels in the form of an accord, signed by the top Malaysian official present in Donetsk, calling the crash site “the territory of the Donetsk People’s Republic.” That offered a level of apparent recognition that even the rebels’ main backer—Russia—has avoided.
“It’s a tragic occasion, but we’ve proven we can be a subject of an intergovernmental agreement,” said Sergei Kavtaradze, an aide to rebel leader Alexander Borodai.
That recognition could antagonize Kiev and Washington, which have striven not to give any credibility to the rebels, whose main leaders are Russian citizens with few ties to the area.
State Department deputy spokeswoman Marie Harf said in a briefing Monday that the negotiation “in no way legitimizes” separatists. A Ukrainian government spokesman declined to comment. People close to Mr. Najib’s office said the dealings didn’t amount to recognition.
Still, Mr. Najib’s intervention resolved a diplomatically awkward situation, enabling the bodies to be retrieved and an investigation to be initiated.
When Mr. Najib, 61 years old, received word of Malaysia’s second aircraft disaster in less than five months last week, he immediately went to the Kuala Lumpur airport operations center and took charge. There were 43 Malaysian passengers and crew members aboard the plane, making the country’s losses second only to the Netherlands. As a predominantly Muslim nation, Malaysians are used to quick burials, and the sight of bodies lying around the crash area was particularly upsetting.
Mr. Najib—who has preserved Malaysia’s traditional stance of not taking sides among the U.S., Russia and China—worked the phones with foreign leaders. But he steered clear of joining many Western leaders in blaming the rebels for downing the airliner.
Instead, he quietly began looking for a back channel to speak with the insurgents, said one of the people close to Mr. Najib’s office.
Known as a calm and pragmatic mediator, Mr. Najib reached out to Mr. Borodai, a former Moscow PR man, through an unidentified intermediary.
Negotiating with another country’s rebels violates an informal rule of diplomatic protocol, and Mr. Najib faced the danger of public embarrassment and offending other nations if his attempt to negotiate a deal fell through and the attempt went public.
“He felt we were at a complete impasse and no one was getting anywhere with this,” said a second person close to the prime minister’s office. “The prime minister was really aware that there were risks. People could blame him for negotiating with terrorists.”
Mr. Najib spoke with Mr. Borodai at least twice by telephone, said the people close to his office, making clear that he wanted three things: the remains, the data recorders and access to the site for investigators.
Mr. Najib, under pressure from the opposition and even some of his own advisers to take a tougher line on the rebels, told almost no one of his initiative.The Malaysians phoned Mr. Borodai from Kharkiv, a city northeast of Donetsk and hundreds of miles inside the government-held territory, and asked the rebels to pick them up. The insurgents refused and met the Malaysians at a town on the front line, from where they drive to Donetsk with an armed convoy.
At first, some rebels said they would investigate the incident themselves, or ship the flight recorders to Moscow. They also demanded a cease-fire, which could have allowed them to consolidate their hold on eastern Ukraine.
As talks progressed, Mr. Najib ordered a 12-person team headed by Col. Mohammad Sakri of the Malaysian National Security Council to head from Kiev to the rebel-held area.
As the dozen Malaysian officials in a convoy of rental cars negotiated their way through checkpoints that dot eastern Ukraine’s conflict zone Mr. Najib steeled their nerves in a phone call.
“Tell people it was Malaysia’s plane and the team is going through to recover our dead and the plane, and that it is only right,” Mr. Najib told Col. Sakri, according to a person familiar with the call.
Mr. Kvatardze said the rebels were surprised by the audacity the Malaysians showed in driving through a zone that has been torn by a three-month conflict.
Arriving in the rebel-held regional capital of Donetsk early Monday afternoon, they headed into talks with top insurgents at the seat of their flimsy political organization known as the “Donetsk People’s Republic.”
The meeting took place on the 11th floor of the regional assembly building that the rebels seized in April, a drab gray structure that used to house the local Communist Party headquarters.
Col. Sakri, a diminutive, bespectacled civil servant, stood in contrast to the burly rebel gunmen who guard the building. The meeting lasted several hours, only breaking when the Malaysians went to pray.
By the end of the discussions, Mr. Borodai said he would pass the bodies and black boxes only to the Malaysia team, said one person close to the prime minister’s office. Another call between Mr. Borodai and Mr. Najib sealed the deal.
Just after 1 a.m., Col. Sakri signed an agreement with a top separatist official confirming the handover of the black boxes.
The stamp of the National Security Council of Malaysia is misspelled, “Sekurity,” suggesting a hasty effort to fulfill bureaucratic protocol by having the stamp made locally.
Col. Sakri thanked Mr. Borodai, calling him “His Excellency.”
“We don’t blame anybody, we don’t believe anybody, we just want to deliver the bodies as soon as possible,” he said.
—Felicia Schwartz in Washington contributed to this article.
Write to Alexander Kolyandr at Alexander.Kolyandr@wsj.com