SIX policemen and a civilian were killed when a dozen men attacked Sri Lanka's cricket team with rifles, grenades and rocket launchers.
The gunmen also wounded seven Sri Lankan players and an assistant coach from Britain. Their injuries were not life-threatening, officials said.
The attackers ambushed the convoy carrying the squad and match officials around 100 yards from the main sports stadium in Lahore, triggering a 15-minute gun battle with police guarding the vehicles.
None of the attackers was killed or captured at the scene, city police chief Haji Habibur Rehman said. Authorities did not speculate on the identities of the attackers or their motives.
Two of the Sri Lankan players - Thilan Samaraweera and Tharanga Paranavitana - were stable in hospital.
Team captain Mahela Jayawardene, Kumar Sangakkara, Ajantha Mendis, Suranka Lakmal and Chaminda Vaas all suffered minor injuries, along with British assistant coach Paul Farbrace.
Veteran batsman Sangakkara told Sri Lankan radio station Yes-FM that "all the players are completely out of danger".
Authorities immediately canceled the test match and the Lahore governor said the team was flying home.
Sri Lankan President Mahinda Rajapaksa condemned the attack and ordered his foreign minister to immediately travel to Pakistan to help assist in the team's evacuation and ensure they were safe.
TV footage of the attack showed gunmen with backpacks firing at the convoy as they retreated from the scene.
Several damaged vehicles could be clearly seen, and a lone, unexploded grenade was lying on the ground.
Other video showed the bodies of three people crumpled on the ground.
Nadeem Ghauri, a Pakistani umpire who witnessed the attack, said: "The firing started at about 8:40 and it continued for 15 minutes, our driver was hit, and he was injured."
Lahore police chief Rehman said officers were hunting down the attackers who managed to flee.
Later, at least eight Sri Lankan players and team officials left the stadium on a Pakistani army helicopter for Lahore airport.
Sri Lanka had agreed to the tour only after India and Australia postponed scheduled trips.
The attack - coordinated, using multiple gunmen armed with explosives - is reminiscent of the Mumbai strikes in November that led to raised tensions between Pakistan and India.
In the past, India and Pakistan have blamed each other for attacks on their territories.
Any allegations like that will trigger fresh tensions between the countries, which are already running dangerously high.
The Tamil Tigers, fighting for an independent state for Sri Lanka's Tamil minority, rarely launch attacks outside Sri Lanka.
Most of the violence in Pakistan occurs in its northwest regions bordering Afghanistan, where Taliban and al-Qaida militants have established strongholds.
However, Lahore has not been immune from militant violence.