* Square's $29 bln buyout of Afterpay to close next year

* Afterpay annual merchant margins steady at 3.9%

* Net transaction losses 0.6% of total volumes, up from 0.4%

Aug 25 (Reuters) - Afterpay Ltd said on Wednesday its annual marketing costs more than doubled as it entered new markets to tap a pandemic-driven boom in buy now, pay later (BNPL) services, widening the Australian company's loss ahead of Square's buyout.

Jack Dorsey's payments firm said earlier this month it will buy Afterpay https://www.reuters.com/technology/square-buy-australias-afterpay-29-billion-2021-08-01 for $29 billion and integrate it with its own merchant- and consumer-focused offerings.

Afterpay spent heavily over the past year to boost its presence in the largely untapped U.S. market, which overtook the company's home country of Australia to become its biggest.

Underlying sales nearly doubled to A$21.1 billion ($15.30 billion) in the year to June, but also saw bad debts rise from first-time users.

Net transaction losses tripled to A$132.6 million, or 0.6% of total volumes. The company's statutory loss ballooned to A$159.4 million from A$22.9 million, while core earnings fell 13%.

Citi said the "soft result" could lead to consensus downgrades. Afterpay's shares were down 1% at A$133.78.

The company, which had largely pre-reported its annual results, said merchant margins held firm at 3.9% even as it deals with intense competition from the likes of Klarna and PayPal Holdings Inc.

On competition, Afterpay co-founder Nick Molnar told Reuters the trend has not changed from the early days, but it was now "unfolding at a far larger scale" in key markets.

The Square deal is the clearest sign yet the BNPL sector is here to stay, and likely to fuel further consolidation.

"This is about capturing the opportunity that is presented in front of us," Molnar added, pointing to the opportunities from integration with Square's Seller and Cash App.

Square's merchant network is expected to benefit from BNPL's popularity, while Afterpay's 16-plus million customers will be able to access Cash App offerings, such as stock trading.

($1 = 1.3793 Australian dollars)

(Reporting by Nikhil Kurian Nainan in Bengaluru; Editing by Aditya Soni and Shounak Dasgupta)