WASHINGTON — Having tried without success to unlock frozen credit markets, the Treasury Department is considering taking ownership stakes in many United States banks to try to restore confidence in the financial system, according to government officials.

Treasury officials say the just-passed $700 billion bailout bill gives them the authority to inject cash directly into banks that request it. Such a move would quickly strengthen banks’ balance sheets and, officials hope, persuade them to resume lending. In return, the law gives the Treasury the right to take ownership positions in banks, including healthy ones.

The Treasury plan was still preliminary and it was unclear how the process would work, but it appeared that it would be voluntary for banks.

The proposal resembles one announced on Wednesday in Britain. Under that plan, the British government would offer banks like the Royal Bank of Scotland, Barclays and HSBC Holdings up to $87 billion to shore up their capital in exchange for preference shares. It also would provide a guarantee of about $430 billion to help banks refinance debt.