(Adds share price movement, Ferrovial comment)
SYDNEY, April 29 (Reuters) - Australian immigration detention camp operator Broadspectrum Ltd BRS.AX agreed to support a A$769 million ($586 million) bid from Spain's Ferrovial SA FER.MC after Papua New Guinea vowed to shut its camp there, sending its share price soaring.
Broadspectrum's board had previously urged shareholders to reject several offers from infrastructure giant Ferrovial, most recently on April 6, but said late on Thursday that the PNG decision had increased uncertainty over its future earnings.
Ferrovial said it welcomed the change of heart. The group controls 31.2 percent of Broadspectrum's shares and needs more than 50 percent acceptance by Monday evening for the takeover to succeed.
On Wednesday, the PNG high court ruled that a detention centre Broadspectrum runs for the Australian government housing more than 800 Australia-bound refugees was unlawful. The PNG government said it would shut the camp. shares jumped 33 percent in early trade on Friday to a nine-month intraday high of A$1.495, in line with Ferrovial's A$1.50-per-share offer, while the broader market fell 0.2 percent.
Despite the about-face, shareholders may regret the company's decision to reject a higher A$2 a share offer in 2014 as too low.
Broadspectrum, which also runs an Australian detention centre on the small Pacific island of Nauru, has been counting on government contracts like the Papua New Guinea detention camp to diversify out of the beaten-down mining sector.
The PNG decision "has increased the level of near-term uncertainty to (Broadspectrum's) contract with the (Australian) Department of Immigration and Border Protection, and future earnings that may be derived from it", the company said in a statement.
Noting that the Ferrovial offer closes on May 2, Broadspectrum said "it is unlikely that the company will have certainty as to the potential impacts before the current scheduled closing date".
($1 = 1.3125 Australian dollars)