By Aditya Kalra and Mubasher Bukhari
WAGAH India/LAHORE Pakistan (Reuters) - Indian and Pakistani intelligence agencies both picked up plans for an imminent strike on their Wagah land border ahead of a suicide blast that killed 57 people on Sunday, and heightened security possibly averted a more devastating attack.
Pakistani police on Monday said they had recovered a "huge" cache of weapons and explosives near the border, where thousands of Indians and Pakistanis gather at dusk every day to watch a flamboyant ritual parade by their security forces.
Pakistani police spokeswoman Nabeela Ghazanfar said the latest death toll was 57 after the bomber detonated explosives in a car park 500 meters (yards) from the border gates and parade ground, just as hundreds of spectators were returning from the ceremony.
Pakistani and Indian agents, who are arch-rivals and do not share intelligence, gave conflicting accounts of whether the bomber's true intention was to cause casualties on the Indian side of the border and stir up tensions between the nuclear-armed nations.
"It appears the bomber wanted to target ground zero where Pakistan and India border officials stand together to perform the flag ceremony but he could not enter due to tight security on the last gate," a Pakistani intelligence official told Reuters.
"Had he managed to reach the place, there would have been the worst scenario at both sides."
If successful, such an attack would likely have severely tested ties between India and Pakistan, already frayed after weeks of shelling further along the border killed 17 people in October.
Another source said a second suicide vest had been found in a field near the explosion site, suggesting there might have been another bomber.
"The target - the border facility that symbolizes trade and interaction between India and Pakistan - is a tempting one for extremist Pakistani groups that want conflict with India and oppose any detente or cooperation with New Delhi," said Bruce Riedel of the Brookings Institution, a former adviser on South Asia to U.S. presidents.
The border remained open on Monday, but both sides suspended the daily flag-lowering ceremony for the first time since they fought a war in 1971, as a mark of respect for the dead, India's home ministry said.
Under the new government of nationalist Prime Minister Narendra Modi, India has stepped up its response to perceived aggression from neighbors Pakistan and China, with which it has long-standing border disputes.
Modi condemned Sunday's attack as a "dastardly act".
"My condolences to the families of the deceased. Prayers with the injured," he said on Twitter.
India regularly alleges the involvement of Pakistani security agencies in militant attacks on its soil, including the 2008 Mumbai attacks in which 166 people were killed when Pakistani militants went on a three-day rampage in India's financial capital.
The two countries have fought three wars since they were carved out of British India in 1947. They fought a limited conflict in 1999 and were again on the brink after a militant attack on India's parliament led to troop build-ups in 2002.
FORCES ON 'RED ALERT'
An official from India's foreign intelligence service, the Research and Analysis Wing, said the blast at the border was squarely aimed at Pakistan's security forces, a version in line with several Pakistani Taliban splinter groups that claimed the attack as revenge for an army offensive against militants near the Afghanistan border.
"It is reprisal attacks against the establishment there. It's been a long time coming, ever since the TTP (the Pakistan Taliban) has been under pressure," he said.
An Indian official said the home ministry received two intelligence warnings in mid-October of possible attacks along the border or at the nearby Golden Temple in the city of Amritsar, the most sacred site for Sikhs.
"Based on these reports the BSF was ordered to upgrade security and a red alert was also issued," said a senior home ministry official. The official declined to be named because he was not authorized to speak to media.
"Warnings from intelligence departments are a regular feature but this time we had a clear input that the retreat and Golden Temple could be prime targets. This message was conveyed to the local police."
Jagdeep Singh, a superintendent of police in Amritsar who is involved with security around the Wagah border, told Reuters he had installed checkpoints at two spots 3 km (two miles) away from the flag ceremony venue after the warnings in October.
Every day, thousands of Indians and Pakistanis flock to watch the elaborate show where border security officials kick their feet high and grimace in mock aggression in a peacock-like display of patriotism. It is one of the only chances regular citizens from the two countries get to observe each other.
(Additional reporting by Rupam Jain Nair, Frank Jack Daniel and Sanjeev Miglani in NEW DELHI, and Maria Golovnina in ISLAMABAD; Writing by Frank Jack Daniel; Editing by John Chalmers and Jeremy Laurence)