North Korea released 16 Chinese fishermen and their boat on Tuesday, Chinese state media said, after reports that armed assailants had taken the sailors hostage fuelled strains between the neighbours.
"All the fishermen with the boat are safe on their way back," China's Xinhua news agency said, citing a Chinese embassy official in Pyongyang it said had heard the news from the shipowner.
Xinhua said the fishermen had been detained "by the Democratic People's Republic of Korea side", using the North's official name, without giving further details.
The vessel's owner Yu Xuejun said that armed North Koreans seized the boat in waters between the two countries on May 6 and demanded 600,000 yuan ($98,000) for the men's release, adding they were probably from Pyongyang's military.
The incident is the latest strain in the relationship between the neighbours.
Beijing is Pyongyang's sole major ally and its key provider of aid and trade, but China said it "firmly opposed" the nuclear-armed North's atomic test in February.
North Korea has for years done most of its banking through China, but with the imposition of stronger UN sanctions after the nuclear test, Beijing has come under greater pressure to tighten its control on Pyongyang's financial flows.
The state-owned Bank of China in early May shut the account of a North Korean bank accused by the United States of supporting the atomic programme.
Reports said the boat's captors had asked Yu to pay the ransom into a bank account in the northeastern Chinese city of Dandong, a major hub for trade between China and the North.
The detention caused outrage online in China, with Internet users calling on Beijing to take a tough stance against Pyongyang, and accusing authorities of not making sufficient efforts to secure the men's release.
China has stayed in "close communication" with North Korea over the incident, foreign ministry spokesman Hong Lei said at a regular news briefing on Monday.
In an editorial Tuesday before the release was announced, the state-run Global Times, which often reflects nationalist opinion in China, said that Beijing should "should let the North Korean side know we are angry".
"If North Korea continues to go rogue, China should take actions to push it toward a more measured response," it said, adding: "If we don't set rules for North Korea, our whole government's image may be seen as being too weak."
The incident came a year after the return of 29 Chinese fishermen also kidnapped by unidentified North Koreans who had demanded a 1.2 million yuan ransom.
Those sailors were returned without ransom after the foreign ministry said it had contacted North Korea in an effort to resolve the case, Xinhua reported at the time.
"There is no clear demarcation of the sea border between China and North Korea," the Global Times quoted Lu Chao, a Chinese maritime researcher, as saying.
"Whenever North Korean coastal troops lack money, they cross the line and detain Chinese vessels to extort money. And most ship owners choose to pay the ransom if the amount is not too high," he said.