The blast targeted a convoy of Pakistani embassy vehicles
A powerful mine exploded near the official residence of President Mahinda Rajapakse as a convoy, including a Pakistani embassy vehicle, went past.
The Pakistani ambassador, Bashir Wali Mohamed, was travelling in the convoy but was unhurt in the incident.
There has been fierce fighting between government forces and Tamil Tigers in the north and east in recent days.
A Pakistani official said Mr Mohamed was returning from a flag-raising ceremony for Pakistan's Independence Day when the explosion happened.
The blast shook the windows of neighbouring buildings and damaged an embassy vehicle, reports said.
Ceasefire 'unravelling'
The blast came after the Tamil Tigers accused government forces of bombing an orphanage, killing 43 school girls and injuring 60 in the rebel-controlled northern district of Mullaituvu.
The military said there had been air raids, but denied any knowledge of the alleged incident.
The government has also denied rebel accusations that its forces killed at least 15 people in an attack on a church in the predominantly Tamil village of Allaipidddy on an island just west of Jaffna.
The Tigers have ruled out peace talks with the government while heavy fighting continues between the two sides.
The recent flare-up in fighting has alarmed Sri Lanka's key foreign donors - the US, Japan, the European Union and Norway - who have called for an immediate end to the hostilities, which they said was "seriously unravelling" the 2002 ceasefire agreement.
They also expressed serious concern about the humanitarian situation.
The ceasefire aimed to halt more than two decades of war between the government and the rebels, who are fighting for an independent homeland for the country's minority Tamil people in the north and east.
It remains officially in effect, despite months of violence.
Kilka godzin po ostrzeżeniu Tamilskich Tygrysów o zamachach w Kolombo na Sri Lance wybuchła potężna bomba. Prawdopodobnie była to mina odłamkowa. Siedem osób nie żyje, a siedemnaście jest rannych. Atak miał miejsce kilka godzin po ataku powietrznym rządu Sri Lanki, w którym zginęły dziesiątki osób.

Wybuch miał miejsce około półtora kilometra od domu prezydenta kraju, Mahindy Rajapakse. Ambasador Pakistanu jechał w konwoju, gdy mina wybuchła, lecz nic mu się nie stało.

"Z całą pewnością był to atak Tamilskich Tygrysów na samochód ambasadora Pakistanu", powiedział rzecznik wojskowy.

W ciągu ostatnich kilku dni można było zaobserwować nasilenie walk na północy i wschodzie kraju pomiędzy siłami rządowymi a Tamilskimi Tygrysami.

Tamilskie Tygrysy to militarna i polityczna grupa, która prowadzi brutalną kampanię przeciwko rządowi Sri Lanki od lat 70. Ich głównym celem jest utworzenie w północnej części Sri Lanki niepodległego państwa tamilskiego, Ilamu.