HBOS has confirmed it is in advanced talks with Lloyds TSB about creating a UK retail banking giant worth £30bn.
The government has also said it would overrule any concerns that competition authorities may raise, BBC Business Editor Robert Peston said.
The deal is set to value HBOS at about £15bn, or 280p a share, a significant premium on its closing price of 147.1p.
A takeover would end uncertainty about the strength of Halifax-Bank of Scotland after a run on its shares.
The advanced talks - first reported by the BBC - are being encouraged by both the Treasury and Financial Services Authority (FSA) as a deal will ease concerns about the health of the UK banking sector, our business editor added.
The credit crunch has wreaked havoc on some of the world's financial institutions in recent days.
Later on Wednesday Chancellor Alistair Darling said merger talks between Lloyds TSB and HBOS could continue well into the night.
He sought to reassure the market by saying the government's main concern was to maintain the stability of the banking system.
Fear of a run
Our business editor said the government decided to push through the tie-up after HBOS had voiced concerns that depositors and lenders had begun to withdraw their credit from the bank.
"There were growing concerns in the HBOS boardroom that a climate of fear was being created about its future, that could have led to a funding crisis - or a Northern-Rock style run, on steroids," he added.
HBOS workers give their opinions on merger talks with LLoyds TSB
The deal was negotiated at a very high level, with Prime Minister Gordon Brown telling Lloyds TSB chairman Sir Victor Blank that it would be helpful if Lloyds could end the uncertainty surrounding HBOS by buying it.
"It was not in the government's interest for there to be the faintest risk that it would have another Northern Rock on its hands," our business editor added.
The boards of both banks are expected give their approval to the tie-up which should be announced early on Thursday.
Following the takeover, Lloyds chief executive Eric Daniels is expected to take the helm of the enlarged group. The future of HBOS chief Andy Hornby is unclear.
Fears had been voiced that the proposed deal would face objections from competition watchdogs over the combined market share the enlarged group would have in mortgages and savings.
It is interesting to see this as an indication of the consolidation into the financial system
With 20% of the UK mortgage market, HBOS is the country's largest mortgage lender. Lloyds ranks fourth with an 8% share.
However, the government said it would override the powers of the Office of Fair Trading and Competition Commission to push the deal through "in the interests of financial stability", our business editor said.
In an effort to avoid this potential stumbling block, the Treasury and the Bank of England have not been asked to help support the deal using taxpayers' money.
HBOS and Lloyds were hoping to tap fresh funds from Bank's Special Liquidity Scheme.
The scheme lets lenders swap potentially risky mortgage debts for secure government bonds, helping unblock jammed up money markets.
Chancellor Alistair Darling on bank stability
But, after news of the HBOS takeover emerged, the Bank of England announced it would be extending the current liquidity scheme from October to January "in view of the current disorderly market conditions".
On the London market, HBOS shares have seen wild swings during the day on the London market, climbing as high as 220p and falling as low as 88p.
Shares in the lender eventually closed 19% lower, while Lloyds ended unchanged at 279.75p.
A buyout would create a banking giant that many analysts suggest would be able to cope with the current crisis hitting financial markets across the globe.
HBOS customers give their views about the bank and the merger talks
While Lloyds would gain access to a larger share of the UK mortgage market, it would also be a case of "the bigger the better" as it would leave the enlarged bank on a sounder financial footing.
News of the takeover comes just two months after HBOS raised £4bn through a rights issue. At the time just 8% of the issue was taken up by investors, leaving underwriters with the bulk of the shares.
HBOS, which was created by the merger of the Halifax and Bank of Scotland in 2001, has come under pressure in recent days amid concerns about its exposure to the US sub-prime market.
Questions have been raised about whether it will be able to refinance its debt of more than £100m in coming months.
As the UK's largest mortgage lender HBOS has been hit by recent weakness in the property market. It also borrows a large proportion of its funding from the wholesale money markets where available funding has been drying up.
While the firm itself has offered reassurances about its financial health, the FSA has also moved to reassure the market saying the bank is "a well-capitalised bank that continues to fund its business in a satisfactory way".
LLOYDS vs HBOS
Branches - Lloyds 1,900; HBOS 1,100
Customers - Lloyds 16 million; HBOS 22 million
Employees - Lloyds 70,000; HBOS 72,000
Savings - Lloyds is the UK's fourth largest savings provider; HBOS is the market leader
"It is interesting to see this as an indication of the consolidation into the financial system," said finance expert Dr Paolo Subacchi, of think-tank Chatham House.
"We are clearly through a phase of restructuring and consolidation and the fact that two big players in the market are signalling their intention to merge is another sign that we are going in that direction."
James Ferguson from the stockbrokers Pali International added that the deal was a "second bite of the apple" for Lloyds as it had signalled its interest in taking over Northern Rock when the lender ran into trouble last year.
At the time, the proposal ran into trouble from competition authorities.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.