CANBERRA, Australia—Australia is close to buying up to 10 submarines from Japan for as much as 20 billion Australian dollars (US$18.7 billion) in a move that would turn the north Asian country into a weapons exporter for the first time since World War II.

The deal, which senior defense officials on Monday said they expect to be signed this year, risks stoking regional tensions since it positions Tokyo as a major guarantor of Australia's security as relations between China and some of its neighbors, including Japan, remain...