It was believed the two children were born in the United States and had been visited by Ronaldo’s mother.
Portugal lost the semi-final on penalties to Chile but are due to play in the third-place playoff against either Germany or Mexico.
The news had not been confirmed officially, but last night Ronaldo posted a statement on Facebook saying he was leaving the Confederations Cup in Russia early “to finally be with my children for the first time.”
He added: “I was in the service of the national team, as always, body and soul, even though my two sons were born.”
Ronaldo already has a seven-year-old son called Cristiano Ronaldo Jnr.
In a statement, the national team said: “The President of the FPF and the National Team were informed before the Confederations Cup by the National Team captain, Cristiano Ronaldo, that he had been a father.
“The athlete, despite the birth of his children, made a point of being in the service of the National Team, in a gesture that we must underline and praise.
“The President of the FPF and the National Selector understand that if it is impossible to reach the goal of winning the Confederations Cup, they must release the athlete so that he can finally get to know his children.”