NEW DELHI — Angered by a New York Times investigation detailing how China seized ownership of a seaport in Sri Lanka, a group of Sri Lankan lawmakers denounced the newspaper on Monday, focusing their ire on two local journalists for the newspaper.

On Monday night, the lawmakers, who are allies of the former president Mahinda Rajapaksa, held a televised news conference in which they claimed that the journalists, Dharisha Bastians and Arthur Wamanan, were working on behalf of the current government to malign Mr. Rajapaksa. One lawmaker displayed a close-up photo of Ms. Bastians’s face for the cameras.

The news conference came after a days-long campaign on social media to discredit the journalists, who provided logistical help for the article, and to attack their families.

The campaign on Twitter and Facebook received the support of Mr. Rajapaksa’s family, including his son Namal Rajapaksa, a member of Parliament, who reposted claims that Ms. Bastians and the main author of the ports investigation, the Times correspondent Maria Abi-Habib, had been paid to write the piece by Sri Lanka’s current government.