MEXICO CITY — The president of El Salvador was addressing the plight of thousands of his fellow citizens who emigrate each year — including a father and daughter who drowned last week while trying to cross into the United States — when he did something rare among leaders in the region.

He took responsibility.

“People don’t flee their homes because they want to,” President Nayib Bukele said Sunday at a news conference in San Salvador, the capital of El Salvador. “They flee their homes because they feel they have to.”

“They fled El Salvador, they fled our country,” he declared. “It is our fault.”

Mr. Bukele’s comments were remarkable in a region where political leaders have been averse to assuming responsibility for the social and political dynamics that drive migration and have generally paid only lip service to the idea that conditions must improve at home to dissuade people from leaving.

Driven by a combination of factors — including poverty, unemployment, rampant violence and government corruption — a steady stream of Salvadorans, along with people from neighboring Guatemala and Honduras, have fled their homes to seek a better life, most of them in the United States. The surge of migrants seeking to cross the southwest American border has been condemned by President Trump, who has sought to restrict immigration, including by those seeking asylum.