A threatened partial shutdown of the US government will not hit foreign nationals lining up for visas to visit the United States, a US official said Monday.

"Activities carried out by the Bureau of Consular Affairs will continue domestically and abroad, so that means they will continue visa issuance as well as our passport operations," State Department spokeswoman Jen Psaki said.

US lawmakers have until midnight to prevent the first US government shutdown in 17 years by agreeing on budget legislation, but a deal appeared remote Monday.

Psaki also predicted there would be little immediate effect on the State Department's operations if the shutdown goes into force, and most staff would also not be given mandatory furloughs.

"If a government shuts down, initially, Department of State and USAID activities can be sustained on a limited basis for a short period of time," she told reporters.

She would not detail how long she was talking about, whether days or weeks, saying it was something "our budget wonks are still punching through."

And Psaki added that a trip by US Secretary of State John Kerry to Tokyo and Indonesia would go ahead as planned later this week.

"The State Department and USAID are national security agencies and will take steps to continue working to advance the national interest, even in the event of a shutdown and reduced staff," Psaki said.

Part of the reason why the department would be able to keep going was that its funding for the fiscal year 2013, which began on October 1, 2012, was only received in March.

So "we will have residual funds available beyond today as a result," Psaki said.

Most of its aid and assistance programs were also funded over several years, while some like visa services were financed through the fees charged, she said.

"Because we're able to sustain our operations on a limited basis, the vast majority of normal functions and operations will continue," Psaki stressed.