Christopher Koch, who was widely regarded as one of Australia’s finest novelists and whose best-known book, “The Year of Living Dangerously,” became even better known as a film, died on Monday in Hobart, Australia. He was 81.

The cause was cancer, said his agent, Margaret Connolly.

Guy Hamilton, the lead character of “The Year of Living Dangerously,” was loosely based on Mr. Koch’s younger brother, Philip, a reporter for the Australian Broadcasting Commission who covered the violent decline of the regime of President Sukarno of Indonesia in the 1960s.

In Mr. Koch’s narrative, Hamilton’s personal life and his work as a journalist become entangled with people whose identities and loyalties are slowly revealed to be more complicated than he expected — echoing the mystery with which many Australians regarded Asia and its political turbulence at the time.

The book was published in 1978. The film, whose screenplay Mr. Koch (pronounced kosh) co-wrote, was released in 1982, with Mel Gibson in the starring role. (Mr. Gibson’s tense signoffs to his radio dispatches — “This is Guy Hamilton in Jakarta” — are remarkably similar to those of Philip Koch, some of which are available online.)