Washington (CNN) House Minority Leader Nancy Pelosi spoke for a little more than eight hours to oppose the budget deal to lift spending caps and avert a government shutdown -- because the plan does not address immigration issues.

The House Historian's office told CNN that Pelosi's speech is the longest on record on the House floor, according to their records.

Pelosi started speaking shortly after 10 a.m. ET, and wrapped the speech a little after 6:10 p.m. ET.

"I have had the privilege of reading the testimony from Dreamers, I still have more," she said, receiving applause in the chamber. "I thank all of you."

A source close to the California Democrat told CNN she thought of the idea overnight to speak for hours on the House floor. The source said she was wearing four-inch-heels while delivering the speech and only sipped water.

Read More