A US politician spoke for more than 20 hours in the Senate against a healthcare reform supported by President Obama.

Republican senator Ted Cruz included a bedtime story for his two daughters, who were watching him on TV, during his talk marathon against Obamacare.

Cruz read from the classic children's book Green Eggs and Ham by Dr Seuss.

"Do you like green eggs and ham?" Cruz asked the Senate. "I do not like them Sam-I-am."

Towards the end of the story, the senator diverted slightly from the script to hit out against the proposed health reforms.

"When Americans tried it, they discovered they did not like green eggs and ham and they did not like Obamacare either," he said.

"They did not like Obamacare in a box, with a fox, in a house or with a mouse. It is not working."

Cruz vowed to speak until he was no longer able to stand and kept going all night.

His protest technique was dubbed a "talkathon" as technically it was not a filibuster because the vote was still expected to go ahead.

Cruz's stunt drew cross-party criticism for delaying the Congress agenda.

The Senate has to vote on a budget bill to keep federal agencies running. That bill includes funding for the healthcare law that Cruz opposes.

If the bill is not approved by both the Senate and House of Representatives by 1 October the federal government will shut down and a million public sector workers will have their salaries suspended.

"I just don't believe anybody benefits from shutting the government down, and certainly Republicans don't," said Senator Orrin Hatch, a Utah Republican. "We learned that in 1995 [when a similar crisis hit the Clinton administration]."