Paraguayan President Fernando Lugo has been ordered to take a DNA test to see if he is the father of a two-year-old boy, as the child's mother claims.
A judge said that if the test was not done by 24 August, the boy would be declared Mr Lugo's son by court order.
Mr Lugo, 59, is currently in Brazil undergoing medical treatment after being diagnosed with cancer last week.
The former Roman Catholic bishop shocked Paraguay last year when he acknowledged another child as his son.
The mother in the most recent case, Hortensia Moran, said her son, Juan Pablo, was conceived while she was working for one of the left-wing parties that supported Mr Lugo's candidacy for president in 2008.
"I am happy because at last we are going to put an end to this drawn-out and stressful process," Ms Moran said.
Mr Lugo had previously said he was willing to take a paternity test.
A third paternity claim against him was withdrawn earlier this year.
President Lugo was flown to Sao Paulo in Brazil on Wednesday for further medical tests after being diagnosed with non-Hodgkin's lymphoma.
Brazilian doctors have confirmed the diagnosis, but have not made public the severity of the illness or the recommended treatment.
Last week, doctors in Paraguay said the cancer appeared to be in the early stages and was treatable with chemotherapy.
Mr Lugo ended 61 years of conservative rule in Paraguay when he was elected president took office two years ago.
He served as a Roman Catholic bishop of the diocese of San Pedro, one of Paraguay's poorest areas, until stepping down in December 2006, saying he felt powerless to help the country's poor.