Agricultural Bank of China priced its Hong Kong and Shanghai dual listing on Tuesday, a deal that would break all IPO records by raising more than $22 billion when adding in over-allotment shares.

The initial public offering (IPO), which is raising funds to replenish capital, still faces a tough aftermarket, with a debut planned for July 15 in Shanghai, and a day later in Hong Kong. It has fought through a plunging Chinese stock market and a euro zone debt crisis that has shaken other markets across the globe.

Despite the headwinds, China's third largest bank by assets was able to pull in strong demand for the IPO. AgBank, the last of China's big banking institutions to go public, has a sprawling network of branches in China's rural parts but also a presence in its major cities as well.

Only three years ago, AgBank, founded by Mao Zedong in 1951, was technically insolvent, with non-performing loans of around 24 percent. Its turnaround, after a $30 billion bailout and bad loan carve-out, underscores the strength of China's rapidly expanding economy and the state's tight grip on the banking industry.

Beijing-based AgBank sold 25.4 billion shares in Hong Kong at HK$3.20 (41 cents) each, compared with a recently narrowed range of HK$3.18 to HK$3.38, sources directly involved in the deal said on Tuesday. The original range was HK$2.88-HK$3.48.

The lender priced its Shanghai IPO at the top of an indicated range, separate sources directly involved with the deal said.

AgBank will sell 22.24 billion yuan ($3.28 billion)-denominated A-shares at 2.68 yuan apiece, after indicating a 2.52-2.68 yuan range. That means AgBank will raise a total of $19.3 billion, but a greenshoe over-allotment of shares would expand the proceeds to $22.2 billion.

The sources could not be named because they were not authorized to speak publicly about the pricing ahead of an expected announcement on Wednesday.

Given the strong institutional demand backing the deal so far, it is highly likely the greenshoe will be exercised, sources say, though no deal is complete until it debuts.

Investors have been on the sidelines waiting for the AgBank IPO, Mark To, head of research at Wing Fung Financial Group, said. But I see volume picking up once again after the listing as the fundraising has already been discounted in the stock prices and pessimism about the global economy tempers.

Previously, the biggest IPO ever was the Industrial & Commercial Bank of China's <1398.HK><601398.SS> $21.9 billion offering in 2006.

China International Capital Corp (CICC), Deutsche Bank , Goldman Sachs , JPMorgan , Macquarie and Morgan Stanley are the banks handling the Hong Kong offering, along with AgBank's own securities unit. Underwriters for the Shanghai deal are CICC, Citic Securities, Galaxy and Guotai Junan Securities.

AgBank is going public for several reasons, among them to allow Beijing to complete its goal of listing the country's top four banks, several of which also went through insolvency periods in the last decade.

They are now among the largest banks -- and companies -- in the world by market capitalization and assets.

AgBank's offering will also provide a guide for the other Chinese banks that are planning tens of billions of dollars in similar capital raisings this year and will act as a gauge on the risk appetite of investors hurt by plunging global markets and concerns over economic growth.

Investor demand appeared robust on the mainland. A source with direct knowledge of the listing told Reuters that AgBank's Shanghai offering was about 20 times oversubscribed by institutional investors.

Cornerstone investors took up a larger than expected $5.45 billion worth of the Hong Kong share offering, leaving fewer shares for the world's mutual funds.

The institutional demand for the Hong Kong offering comprised of 45 percent from Asia, 30 percent from the United States and 25 percent from Europe, according to one of the sources involved.

The IPO plus the overallotment would value AgBank at around $150 billion, ranking it the fourth biggest bank in the world by market capitalization behind ICBC, China Construction Bank <0939.HK><601939.SS> and HSBC .

LAST OF BIG FOUR

Headed by Chairman Xiang Junbo, an award-winning scriptwriter and war hero, AgBank has 24,000 branches, 441,000 employees and 320 million customers -- more than the population of the U.S.

AgBank's pricing will likely boost sentiment for other Chinese banks planning capital raisings, though there is still more than a week to go before the IPO debuts; Bank of China <3988.HK><601988.SS> and ICBC also have huge fund raisings in the pipeline.

China's benchmark stock index <.SSEC> has fallen nearly a quarter since mid-April and fell sharply last week, partly as investors sold stocks to raise money for the AgBank offer.

Retail demand for both IPOs has so far shown a tepid response.

(Additional reporting by Michael Wei in Beijing; Samuel Shen, David Lin and Farah Master in Shanghai and Fiona Lau in Hong Kong; Editing by Sharon Lindores)

($1=6.780 Yuan)