LONDON — The captain of a river cruise ship involved in a deadly accident on the Danube River in Budapest last week was previously involved in a boat collision in the Netherlands in April, prosecutors in Hungary said on Friday.

The 64-year-old Ukrainian captain, identified by the police only as C. Yuriy, had served as the first officer of the ship in the Netherlands and was questioned as a suspect, Ferenc Rab, a spokesman for the Prosecution Service of Budapest, said by phone.

The ship the Ukrainian was on at the time, the Viking Idun, had collided with an oil tanker near the port of Terneuzen on the Dutch coast, damaging both vessels and causing minor injuries, according to N.O.S., the Dutch public broadcaster. Viking River Cruises, a tour operator based in Switzerland, confirmed in an email that the captain had been on the Viking Idun at the time of the accident in the Netherlands.

Viking River Cruises also operates the larger vessel involved in the Budapest crash last month.

The captain was detained after his ship, the 442-foot Viking Sigyn, rammed an 89-foot sightseeing boat called the Mermaid from the rear on May 29, capsizing the smaller vessel in the Danube. Nineteen people were confirmed killed, and officials were searching for nine others — eight passengers and a crew member — still missing on Thursday, according to the police.

Most of the victims were tourists from South Korea, who had boarded the Mermaid for an evening of sailing through the heart of Budapest, an increasingly popular route on the busy Danube. The accident was also one of the deadliest involving South Koreans since the Sewol ferry disaster in 2014. South Korea sent its own rescue team to assist in the search, including members of its Navy and Coast Guard.

According to Mr. Rab, the captain was found to have deleted data from his phone between the time of the Budapest collision and the authorities’ seizure of his phone. That added ammunition to the case of the prosecutors, who have appealed a decision to grant the captain bail.

Bodies have turned up as far as 70 miles south of Budapest, the Hungarian capital, carried away by the swiftly moving waters of the Danube. The authorities were searching the full length of the river’s Hungarian section south of the city. Divers were working in difficult conditions, with zero visibility and facing the danger of being swept away by high river water. Fifteen boats were helping the effort on a 120-mile stretch of the river.

A floating crane, previously used to build bridges on the Danube and to remove wrecks from the riverbed, was standing at the ready to help lift the Mermaid from the Danube’s riverbed. But an increase in water levels, forecast for the coming days, may delay the recovery.

Officials from Hungary’s waterways agency said on Friday that Slovakia, the country’s northern neighbor, was ready to temporarily manage water levels on the Danube to hasten the river’s retreat and to help rescuers, the state news service M.T.I. reported.

In the emailed statement, Viking River Cruises said that both investigations — into the crashes in Budapest and the Netherlands — were continuing.