The cardinals of the Roman Catholic church on Wednesday chose as their new pope a man from almost "the end of the world" – the first non-European to be elected for almost 1,300 years and the first-ever member of the Jesuit order.

Jorge Mario Bergoglio, the archbishop of Buenos Aires, becomes Pope Francis – the first pontiff to take that name – an early indication perhaps of a reign he hopes will be marked by inspirational preaching and evangelisation.

But the cardinals' choice risked running into immediate controversy over the new pope's role in Argentina's troubled history. In his book, El Silencio, a prominent Argentinian journalist alleged that he connived in the abduction of two Jesuit priests by the military junta in the so-called "dirty war". He denies the accusation.

The new pope appeared on the balcony over the entrance to St Peter's basilica more than an hour after white smoke poured from the chimney above the Sistine Chapel, signalling that the cardinals had made their choice. Dressed in his new white robes, the bespectacled Argentinian prelate looked pensive and perhaps a little intimidated as he looked out at the sea of jubilant humanity in the square.

The former Cardinal Bergoglio was not among the front-runners. But he obtained more votes than any other candidate except former pope Benedict in the 2005 conclave, and – although his election came as a surprise – he was certainly not a rank outsider.

According to some accounts, he was not chosen eight years ago because he begged his fellow cardinals not to continue voting for him. As he uttered his first words – "buona sera" – and the cheering died away, he told the crowd that his peers had been tasked with finding a bishop of Rome. "And it seems that they went almost to the end of the world to find him. But we're here," he said with a smile.

After a prayer for his predecessor, Benedict XVI, the new pope invited the faithful in the square to "pray for the entire world". He added: "I hope that this path for the church will be one fruitful for evangelisation."

Faced with a sharp choice between those cardinals who wanted a thorough shake-up of the Vatican and those who did not, it appeared the electors in the Sistine Chapel opted for compromise. Bergoglio has a reputation for both political canniness and reforming drive. Among the tests facing the 76-year-old will be the awesome managerial demands of the job.

The fumata bianca – the white smoke signal that marks the successful conclusion of a conclave – arrived after five ballots at the end of the second day of voting. The smoke that poured out of the comignolo, the copper and steel tube on the roof of the Sistine Chapel, was greeted with cries of delight and applause from the crowd below. Soon after, the bells of St Peter's rang out, confirming that a new pope had taken over the spiritual leadership of the world's 1.2 billion baptised Catholics.

Inside the Sistine Chapel after the final vote was cast, the most junior of the cardinals, James Harvey, a former prefect of the papal household, called in the secretary of the college of cardinals, Monsignor Lorenzo Baldisseri, and the master of papal liturgical ceremonies, Monsignor Guido Marini, to witness the new pope's acceptance of one of the most daunting jobs on Earth.

The most senior of the electors, Cardinal Giovanni Battista Re, approached the pope-to-be and – in accordance with tradition – asked him in Latin: "Do you accept your canonical election as supreme pontiff?"

Having obtained his consent, he will have asked: "By what name do you wish to be called?" The master of ceremonies, acting as a notary, will then have summoned two of his staff to act as witnesses, and prepared the document that certifies the new pope's acceptance.

Newly elected popes are taken to be robed in the Room of Tears, its name an indication of the reluctance with which most approach the task. The last holder of the office, Benedict XVI, introduced a change in the ritual that allows the new pope to pray before he is announced to the world.

Benedict abdicated on 28 February, saying that he was no longer able to cope with the burden of his office. He was the first pontiff to resign voluntarily since Celestine V in 1294.The world's Catholics will be looking to his successor to provide not only spiritual inspiration but also firm leadership. The new pope was chosen against a background of turbulence and strife unprecedented in modern times. He takes on the leadership of a church whose faithful have been shocked by a proliferation of clerical sex abuse scandals throughout the rich world and dismayed by events in and around the Vatican.

The day for the 115 cardinal-electors began at about 6.30am local time in the Casa Santa Marta, their simple but comfortable – and highly protected – residence in the walled city state. After breakfast, they made their way to the Apostolic Palace, the home of the popes, for morning mass in the Pauline Chapel. By about 9.30am, they had settled themselves into the Sistine Chapel for prayers and the resumption of voting.

Benedict's startling decision to resign came after years of mounting tension and discreet but venomous infighting in the Roman Curia, the central administration of the Catholic church. Last year, some of the pope's correspondence, pointing to bitter rivalries and maladministration – or worse – in the Vatican was published in book form.

Benedict's butler, Paolo Gabriele, was tried and imprisoned for leaking the documents, but the journalist to whom the papers were passed has said that his source was part of a much broader network of disaffected Vatican employees and officials. Gabriele's arrest coincided with a renewed controversy over the Vatican bank, whose chairman was summarily dismissed last May.

The scandals – and a string of controversies over the pope's own declarations – distracted attention from what was expected to be the central theme of his papacy. Benedict came to the leadership of the Catholic church as the pope who would begin the process of re-evangelising an increasingly secular western world.

That too will be an important challenge for his successor. In the approach to the conclave several cardinals said they wanted a great pastor for the world's biggest Christian denomination.

No indication of how or why the new pope was chosen was expected to emerge. On Tuesday, before the start of the conclave, the cardinal-electors took an oath of secrecy, as had those Vatican employees and officials involved in the election.

Additional precautions included a sweep of the Sistine Chapel to ensure that no listening devices had been planted inside and the use of electronic jamming techniques.