"The government should take the responsibility for this tragic death. Maheswaran's security was reduced during the last two weeks, making him vulnerable for an attack of this nature," he said.
"He spoke about corruption, malpractices, abductions, unlawful killings and blamed government for not taking effective measures to stop them."
The military said unidentified men shot the parliamentarian while he was in a Hindu temple and police are investigating.
"Inside the [temple] unidentified gunmen had shot Mr Maheshweran and it was reported he died after being admitted to the hospital," Brigadier Udaya Nanayakkara, a military spokesman, said.
|"He spoke about corruption, malpractices, abductions, unlawful killings and blamed government for not taking effective measures to stop them"|
Tissa Attanayake, the UNP general secretary
The military said another civilian died after being admitted to hospital and seven others were injured in the shooting.
A suspect was reportedly arrested after being wounded by a security guard. The military said he was an ethnic Tamil.
"The police had arrested a person from Jaffna. One of [Maheshweran's] security personnel had fired at him, and he was also admitted to the hospital," Brigadier Udaya Nanayakkara, military spokesman, said.
Maheshweran belonged to Sri Lanka's minority Tamil community, for whom the separatist Tamil Tigers say they have been waging a war against government forces since 1983.
A former Hindu affairs minister and party chief district organiser in the army-held northern Jaffna peninsula, Maheshweran had survived a similar shooting three years ago while running for general elections.
In 2005, Joseph Pararajasingham, a Tamil National Alliance member of parliament, was shot and killed at a church in the eastern district of Batticaloa while attending Christmas Eve prayers.
Nadarajha Raviraj, another legislator from the same party, was shot and killed in Colombo a year after.
Tuesday's killing came as clashes between government forces and Tamil Tiger separatists were escalating with near daily land, sea and air battles.
More than 5,000 people have been killed in fighting between the military and Tigers since early 2006 alone, taking the death toll since the war erupted in 1983 to around 70,000.
Military analysts say there is no clear winner on the horizon, and fear the war could grind on for years.