When President Obama arrives in Dallas Wednesday evening, his first order of business will be to huddle with local leaders to discuss a border crisis that a White House spokesman this week described as an “emergent situation.”

But one of the leaders invited to that meeting, Texas Gov. Rick Perry (R), says the administration has no excuse for being surprised. In a letter to Obama more than two years ago, Perry raised a red alarm about an influx of unaccompanied children crossing the southern border, citing federal statistics showing that the number of minors had shot up 90 percent.

“By failing to take immediate action to return these minors to their countries of origin and prevent and discourage others from coming here, the federal government is perpetuating the problem,” Perry wrote to Obama in May 2012. “Inaction encourages other minors to place themselves in extremely dangerous situations. . . .Every day of delay risks more lives. Every child allowed to remain encourages hundreds more to attempt the journey.”

Two years later, Perry’s letter appears prescient. The number of unaccompanied children at the border, which was 5,200 in 2012, has shot up to more than 52,000 this year — and it could reach 90,000 by the end of September, according to internal Border Patrol estimates.

This week, the White House declared it was unable to handle the influx without significant help, asking Congress for $3.7 billion in emergency funding. The request immediately became embroiled in political divisions on Capitol Hill, as Republicans reacted skeptically because of their concerns over the Obama administration’s record on border security.

Two lawmakers from Texas share their experiences of visiting the overflowing detention centers for illegal immigrants near the Mexico border. They are urging President Obama to visit the border and see the conditions firsthand. (Theresa Poulson/The Washington Post)

The GOP says Obama has ignored other warnings about the crisis. On MSNBC’s “Daily Rundown” on Wednesday, Sen. Tom Coburn (R-Okla.) said his office has evidence that the administration has known about the latest surge of minors since January. Obama ordered a broad interagency response in mid-May, after receiving a briefing from Homeland Security Secretary Jeh Johnson.

Craig Fugate, the administrator of the Federal Emergency Management Agency, said during a Senate committee hearing on Wednesday that his agency did not get involved in helping manage the government’s response at the border until May.

“Although we’ve made progress, we’ve often been interrupted by the influx of kids happening faster than we can discharge them,” he told lawmakers. Fugate said the government made a “massive” effort over the weekend to take children under 5 years old out of the custody of the Border Patrol and place them in shelters overseen by the Department of Health and Human Services.

Perry — widely viewed as a potential 2016 presidential candidate — says he never received a response to his 2012 letter and has denounced Obama for failing to act sooner. He has declared in a round of interviews that Obama is complicit in the problem, even offering a conspiracy theory that the president created the crisis on purpose.

“I have to believe that when you do not respond in any way, that you are either inept, or you have some ulterior motive of which you are functioning from,” Perry said on ABC’s “This Week” on Sunday.

White House officials dismiss Perry’s criticism and said the administration did respond to the governor over his 2012 concerns. A senior administration official said federal officials briefed the governor’s staff more than once on the administration’s efforts to deal with border security after receiving the letter.

This official, who spoke on condition of anonymity to discuss private conversations, said Perry later acknowledged the briefings in a followup letter. The official emphasized that the governor, in his first letter, did not ask the administration for anything in particular and offered no solutions of his own.

Furthermore, the administration official said, the number of minors at the border, while growing in 2012, was a small fraction of what border patrol agents are seeing this year.

“The briefs [to Perry’s office] were intended to give them a clear understanding that the administration and DHS and others were aware of the fact that this was a situation emerging with unaccompanied children, and that we were taking steps to deal with the situation,” the official said.

Ray Sullivan, Perry’s chief of staff from 2009 to 2011, said the governor has “sounded the alarm” bells on immigration with both the Bush and Obama administrations. He said Perry met Obama on the tarmac in El Paso in 2010 and attempted to give him a letter about the immigration situation and his ideas on how to bolster security.

“The president wouldn’t even take it. He told him to give it to Valerie Jarrett, who was standing behind him,” Sullivan said. “Needless to say there are light years of distance between the current administration and the Perry administration.”

By May 2012, Perry’s relationship with the Obama White House was at a low point. He had dropped out of the GOP presidential nomination race, during which he was very critical of the president. The year before, Perry ripped Obama for being slow to provide Texas with emergency funding to combat wildfires, and Obama mocked the governor over his denials about the effects of climate change.

Steve Atkiss, a former George W. Bush administration official who worked in the Office of Customs and Border Protection, said Perry has long taken an antagonistic tone toward the federal government on border issues. Part of the reason, Atkiss suggested, is because such a posture plays well politically in Texas, which has traditionally valued states’ rights over the federal role.

Of the four Southwest border state governors at the time — California’s Arnold Schwarzenegger (R), New Mexico’s Bill Richardson (D), Arizona’s Janet Napolitano (D) and Perry — Perry was the most combative, Atkiss said.

“Here was a Republican from Texas as president, and the most difficult governor to have a completely straightfoward conversation with was Rick Perry,” said Atkiss, now a member of Command Consulting Group, a security firm in Washington. “It just sells in Texas to criticize the federal government and their performance on the border.”

Atkiss acknowledged that Perry raised legitimate points in his letter to Obama. “I’ve always been a true believer that historically our federal effort to defend the border has been dramatically under-resourced,” he said.

Brandon Judd, president of the Border Patrol Council, which represents thousands of federal agents, said the administration ignored repeated warnings from agents about the growing crisis. In 2012, Judd said, the Border Patrol began seeing a shift in illegal activity and border crossings away from the traditional hotspots from Tucson in Arizona to the Rio Grande Valley in Texas.

Agency managers shifted some resources, including more agents, to address the problem but did little to address the specific problem of a growing influx of minors from Central America, especially Guatemala, El Salvador and Honduras. The number of minors from those countries apprehended at the border rose from 3,933 in 2011 to 10,146 in 2012 to 20,805 in 2013, according to federal data.

“All politicians grandstand, but the fact remains that what Perry put in his letter is exactly what happened,” Judd said. “And everybody ignored the problem until the media took the story. This influx didn’t just happen over the last three months. It started in 2012, grew worse in 2013 and got even worse in 2014.”

Katie Zezima contributed to this report.