Charles I of Hungary conquered the castle in 1334. In 1387 Lazar of Serbia sieged it. Becoming a Hungarian ally in 1403–04, he received large possessions, including the important Belgrade and Golubac Fortress. The Turkish occupied it for the first time in 1391, but after that, Péter Perényi recaptured it. King Sigismund of Hungary acquired Golubac by a contract in 1427, but its Serbian captain sold it to the Turks for twelve thousand golds. Sigismund sieged the fortress in spring 1428 in response, but the mission was a failure, the King himself was almost killed by the Turks. In 1458, Matthias Corvinus tried to recapture it, but the siege was interrupted by Hungarian internal conflicts.