The Sri Lanka players were airlifted from the Gaddafi Stadium to the National Stadium in Lahore
The second Test between Pakistan and Sri Lanka has been called off following the attack on the bus carrying the tourists' team in Lahore.
Five Pakistani policemen escorting the team bus were killed in the gunfire and seven Sri Lanka players were injured.
Chaminda Vaas, Ajantha Mendis, Mahela Jayawardene, Thilan Samaraweera, Kumar Sangakkara, Tharanga Paranavitana and Suranga Lakmal were the players hurt.
Samaraweera, who was shot in the thigh, and Paranavitana are in hospital.
And fourth umpire Ehsan Raza is in a critical condition in an intensive care unit in Lahore.
But none of the players' injuries are life threatening and the rest of the Sri Lanka squad flew back home on Tuesday after being airlifted from the Gaddafi Stadium to the National Stadium in Lahore.
Sangakkara, Sri Lanka's vice captain, confirmed he and his team-mates were "safe and out of danger".
"We are shocked but apart from that everyone is OK," Sangakkara said.
"Everyone just hit the deck because of someone shooting. We hit the floor of the bus and stayed there. We heard the bullets hitting the bus and a few explosions.
"We had an amazing driver who just kept driving the bus straight through all of that to the ground. That's probably what saved us.
"I don't regret coming here to play cricket because that's what we have been doing all our lives. That is our profession.
"But I regret this incident, what has happened and the situation that we have had to go through.
"All we want to do now is to go back home to our families, get back home and be safe."
Sri Lanka's assistant coach, former Kent and Middlesex batsman Paul Farbrace, suffered a shrapnel wound to his arm in the attack.
The bus was in a convoy on its way to the stadium ahead of the third day of the second Test.
Match referee Chris Broad, the father of England bowler Stuart Broad, was in the vehicle behind the Sri Lanka team.
Broad, umpires Simon Taufel and Steve Davis and TV umpire Nadeem Chauri were unhurt but their driver was killed by gunfire and Broad was left spattered with blood.
"It was only an hour after the attack that I spoke to him," Stuart Broad said. "He is obviously very shaken up - he's seen some sights that he obviously wishes he hadn't seen.
"He lay in cover while the carnage happened. It all died down and they got driven to safety.
"He got a helicopter to Abu Dhabi two or three hours after the incident. He's safe, well and looking forward to getting home."
Former Pakistan captain Waqar Younis was metres away from the Sri Lankan coach when the attack took place.
"I happened to get to the ground before anybody else," Waqar told BBC Radio 5 Live. "Suddenly I heard a couple of blasts from around the corner and then there was open fire.
"I ran back and I saw the Sri Lankan bus coming quickly. They started dragging people out and a couple of them were injured - I think Thilan Samaraweera got shot - and some were just hit by the glass of the windows.
"There were ambulances all over the place and there were police coming in and going out. It was all happening."
Former England bowler Dominic Cork, who is in Lahore to commentate for Pakistan TV, told BBC Radio 5 Live: "We arrived at the stadium three or four minutes before the team and were just setting up. All of a sudden we heard two explosions and then gunfire.
"I was coming up a set of stairs to the commentary box and I just fell. I thought they were attacking us - it felt that close.
"I then ran into the commentary box and came out and by that time the Sri Lankan team bus had arrived with bullet holes all over it. We were told to stay inside and not come out.
Frightened Farbrace "grateful to be alive"
"That was it for probably about half an hour. I then went to see the Sri Lankan team because I'm very close friends with a few of them.
"They were telling me how it happened. They were stopped by two cars on a roundabout two or three hundred yards away from the stadium and they said six gunmen were at the front and gunmen were at the back.
"The gunmen tried to take out the driver and the driver ducked and got out of the way of the bullets. At that stage, all the team were told to get to the floor.
"I spoke to Kumar Sangakkara, who had a shrapnel wound in his shoulder. He had that removed in the Sri Lankan team dressing room.
"Of the two players more seriously injured - Samaraweera and Paranavitana - one has, they believe, a shrapnel wound in his chest but quite deep and that's why they couldn't remove it.
"The most serious one is Samaraweera and he has, they believe, a gunshot wound in the top of his leg, which at the moment they cannot remove in hospital, and they are considering moving him out of the country under police escort - either home to Sri Lanka or to Dubai."
Samaraweera had scored a double century in Sri Lanka's first innings of 606 all out and Pakistan had reached 110-1 in reply at the end of day two of the Second Test, which was the final match of their 2009 tour.
Sri Lanka have been in Pakistan since 20 January and played a one-day international in Lahore on 24 January, which the tourists won by 234 runs.
The tour was only arranged after India were barred by their government from touring the country following the Mumbai terror attacks in November 2008.
Sri Lanka's president Mahinda Rajapakse condemned the incident as a "cowardly terrorist attack".
In a statement, the England and Wales Cricket Board said: "The ECB is shocked and saddened by the senseless attack on the Sri Lankan cricketers and match officials by terrorists in Lahore today.
"Our thoughts are with the families of those who have been killed or injured in this despicable attack.
"The ECB has also been in touch with both boards, the ICC and the Sri Lanka team to offer their thoughts and condolences to those involved."
And International Cricket Council (ICC) chief executive Haroon Lorgat stated: "We note with dismay and regret the events in Lahore and we condemn this attack without reservation.
"I have confirmed with both member boards that the remainder of the tour has been cancelled and we are working hard to get our match officials out of the area as safely and as quickly as possible.
"I know, also, that the Pakistan Cricket Board is working with Sri Lanka Cricket to make sure the players are flown home at the earliest opportunity."
N Srinivasan, the secretary of India's cricket board, added: "The Board of Control for Cricket in India expresses its sorrow and anguish over the dastardly attack on the Sri Lankan cricket team.
"We pray for the speedy recovery of the injured cricketers and sympathise with their families and compatriots. The BCCI stands alongside Sri Lanka Cricket in this hour of crisis."
India and New Zealand donned black armbands for their ODI in Napier as a mark of respect for the victims of the Lahore attack.
New Zealand Cricket chief executive Justin Vaughan stated: "It is terrible and our thoughts go out to those involved. We are dismayed that this has occurred and we have sent our best wishes directly to Sri Lanka and Pakistan."
New Zealand were scheduled to tour Pakistan later this year but later confirmed that it would not go ahead.
It is a very sad situation but we would have to take this incident into consideration when we plan future tours to this country
Sri Lanka team manager Brendon Kuruppu
Cricket Australia's chief executive James Sutherland said: "Australian cricket has many friends in Sri Lanka and in Pakistan and we sincerely hope they are all safe after this awful incident.
"We are deeply saddened to hear reports that security officials in Pakistan have been killed in this attack."
Australia refused to tour Pakistan in 2008 because of security concerns following the assassination of former Pakistan prime minister Benazir Bhutto.
But Sri Lanka team manager Brendon Kuruppu insisted it had been right for his side to travel and added: "I don't think it was a mistake to come to Pakistan in the first place.
"The Pakistan Cricket Board has given us all assurances that everything would be fine.
"We are lucky that none of the players were injured critically. It is a very sad situation but we would have to take this incident into consideration when we plan future tours to this country."
The ICC announced last month that this year's Champions Trophy will not take place in Pakistan because of security concerns and Pakistan's ODI series with Australia in April and May has been moved to the United Arab Emirates.
Former Pakistan captain Asif Iqbal told Radio 5 Live: "First of all, I am embarrassed and shamed because the Sri Lanka team came to us doing a favour.
"The Sri Lankans came as friends. They wanted to come and help the Pakistan Cricket Board and wanted to come and help Pakistan cricket. Then for this to happen is really an embarrassment for all of us. As a Pakistani, I'm ashamed, too."
Former Pakistan batsman and manager Zaheer Abbas added: "We were already in a shambles before and after this I don't think, in the near future, any team will come and play in Pakistan.
It will be very difficult for international cricket to be hosted in Pakistan for quite some time to come
ICC president David Morgan
"It's really damaged our Pakistan team and all Pakistanis are very very disappointed to hear this news."
Along with India, Bangladesh and Sri Lanka, Pakistan are to co-host the 2011 World Cup, with one semi-final set to be held at the Gaddafi Stadium.
But BBC Sports News correspondent Gordon Farquhar said: "Clearly that is now in serious doubt.
"For the foreseeable future, the country's millions of passionate cricket fans will have to travel abroad to see their team play international cricket."
ICC president David Morgan told Radio 4: "It's devastating news. It's terribly terribly sad. So many people said cricketers would never be targeted in Pakistan and quite clearly that has proved to be incorrect.
"It will be very difficult for international cricket to be hosted in Pakistan for quite some time to come.
"Could the World Cup games still take place there? It's too early to say.
"There could be a regime change in Pakistan, which would settle things down. I really don't know but the probability must be that a great deal will have to change in Pakistan before we could consider playing international cricket there."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.