SYDNEY, Sept 14 (Reuters) - Australia will toughen laws stopping former defence staff from training "certain foreign militaries", introducing a penalty of 20 years prison and widening the ban to stop any Australians offering military training to countries seen as a national security risk.

A series of cases where former military pilots living in Australia had worked for a South African flight school training Chinese pilots, which the United States alleges are Chinese military pilots, has prompted the crackdown.

Australia's "Five Eyes" intelligence partners of Britain, United States, New Zealand and Canada will be exempt from the new law, officials said.

Exemptions will also be provided if the defence minister authorises the training, or it relates to humanitarian relief or United Nations duties.

Penalties of up to 20 years prison will apply for providing military training or tactics to a foreign military or government body, including hybrid civilian and military organisations, or state-owned companies, without authorisation from the defence minister.

Defence Minister Richard Marles introduced the amendment to Australia's parliament on Thursday, saying the bill was partly modelled on U.S. laws, and will strengthen criminal laws in Australia that already ban the provision of military training to a foreign government by former Australian defence staff.

The new law goes further, stopping any Australian citizen or permanent resident from providing such training without the minister's authorisation.

The intention was to "prevent individuals with knowledge of sensitive defence information from training or working for certain foreign militaries or governments where that activity would put Australia's national security at risk", he said.

A former U.S. Marines Corp pilot who had recenty returned from working in China was arrested in Australia last year and faces extradition to the United States on charges of training Chinese military pilots at a South African flying school. The pilot, Daniel Duggan, an Australian citizen, remains in custody and denies any wrongdoing.

The Test Flying Academy of South Africa was placed on a U.S. trade blacklist on national security grounds in June for "providing training to Chinese military pilots using Western and NATO sources".

The flight training division of AVIC, a Chinese state-owned aviation and defence company that was in partnership with TFASA, is also on the blacklist.

The Australian home of TFASA chief operating officer Keith Hartley was raided by Australian Federal Police in November. A court was told Hartley, a former British military pilot, was suspected of organising the training of Chinese military pilots delivered by the flight school. Hartley has not been charged, and denies any wrongdoing.

Under the new law, working for companies where a foreign government holds 50% of shares or the directors are expected to act in accordance with the wishes of the foreign government is also banned.