House Speaker John Boehner says he is not overly optimistic that Republicans and Democrats can come together to resolve the border crisis before Congress adjourns at the end of July for a month-long break.

“I would certainly hope so, but I don’t have as much optimism as I’d like to have,” the Ohio Republican told reporters at the Capitol Thursday.

But Boehner said he will continue working with House Appropriations Committee Chairman Hal Rogers, R-Ky., as well as a special border task force, to find a solution to deal with the tens of thousands of unaccompanied minors from Central America who have flooded the U.S.-Mexico border and overwhelmed U.S. immigration authorities.

The speaker called the issue a “humanitarian crisis at our border” that “needs to be dealt with.”

House leaders hope to have legislation next week to address the issue, though a bipartisan agreement is seriously in doubt.

A sticking point is whether changes should be made to a 2008 law designed to protect Central American children from human trafficking. Republicans have blamed the law for the mass migration of unaccompanied minors, but many Democrats say that any changes to the law should be done separately and not tied to an emergency spending measure to deal with the border crisis.

When asked if Democratic resistance to changing the law was tempering his optimism that a deal could be reached, Boehner smiled and said, "Something like that."

"I don't know how Congress can send more money to the border to begin to mitigate the problem if you don't do something about the '08 law that's being abused. And it is being abused," he said.

But House Minority Leader Nancy Pelosi, D-Calif., told reporters Thursday she believes a solution can be reached without tweaking the law, which was signed by President George W. Bush.

“I do not need believe that they need a change in legislation to more expeditiously provide due process for all of the children that we’re talking about,” she said.

Pelosi also denied that the anti-human-trafficking law, which requires that unaccompanied children from countries that are not contiguous with the U.S. be turned over to the Department of Health and Human Services' Office of Refugee Resettlement, has contributed to the border crisis.

“It’s stunning to me how Republicans have tried to politicize this issue,” she said. “Most of them were responsible for the good legislation that passed in 2008.”