SYDNEY, Australia — In Kings Cross, this city’s bawdy, alcohol-infused red-light district, Mohammad Ali Baryalei once patrolled the sidewalk outside the Love Machine club, his basso voice luring customers in, his muscle keeping the unwanted out. For a time, the police said, his was a world of prostitutes, drugs, gangs and gambling.

But a few years ago, Mr. Baryalei, the son of Afghan refugees who settled in the suburbs of Australia’s most multicultural city, embraced radical Islam and traveled to Syria, where he resurfaced as a lieutenant of the extremist Islamic State. This month, the authorities here said, he was recorded on a phone call instructing a young Australian to carry out what the police described as a “demonstration killing” of a random person in Sydney.

Analysts and policy makers have debated whether the Islamic State, also known as ISIS or ISIL, has the ambition or the reach to carry out large-scale terrorist attacks in the West. Mr. Baryalei’s phone call, from 9,000 miles and a world away from the Australian continent, suggests one answer. It is one of the few known instances of the Islamic State attempting a terrorist act outside its home base in the Middle East.

The intercepted call set off the largest counterterrorism operation in Australian history, resulting in the arrest of a 22-year-old Sydney man whom Mr. Baryalei is said to have asked to carry out a beheading on camera. Prime Minister Tony Abbott said it showed that “a knife, an iPhone and a victim” were the only ingredients needed for a terrorist attack.