(CNN) -- U.S. President Obama and Pope Benedict XVI discussed current affairs, the Catholic Church's teachings and abortion as they met for the first time Friday, according to the White House and the Vatican.
The president also handed the pontiff a letter from Massachusetts Sen. Edward Kennedy, who was diagnosed with brain cancer last year, and asked that the pontiff pray for the senator, Deputy National Security Advisor Denis McDonough said.
Kennedy, 77, a Democrat, received the diagnosis after suffering a seizure in May 2008.
Obama and the pope spent about a half-hour talking, White House spokesman Robert Gibbs said.
Obama told the pope he understands the church's teachings and said, as he has before, that he would like to reduce the number of abortions in the United States, Vatican spokesman the Rev. Federico Lombardi told CNN.
McDonough said the pope gave Obama -- who supports abortion rights and federally funded embryonic stem-cell research -- a Vatican paper titled "An Instruction on Certain Bioethical Questions." Watch the pope and president meet for the first time »
He said his sense was that the two "discussed abortion and stem cells. They discussed a range of those issues."
In a commencement address at the University of Notre Dame, in South Bend, Indiana, on May 17, the president urged a search for "common ground" on abortion.
No matter how much Americans "may want to fudge it ... at some level the views of the two camps are irreconcilable," Obama said.
He urged supporters and opponents of abortion rights to "work together to reduce the number of women seeking abortions by reducing unintended pregnancies, and making adoption more available, and providing care and support for women who do carry their child to term."
The commencement ceremony was boycotted by a number of graduates dismayed by the Catholic university's decision both to tap Obama as its commencement speaker and to give him an honorary degree.
The president and the pope also discussed the pontiff's recent encyclical -- which criticized the current practice of capitalism as being shortsighted and unethical -- as well as the Middle East, Cuba and the situation in Honduras, McDonough said.
Obama had been in L'Aquila, Italy, for the G8 summit. He headed to Ghana after the meeting.
CNN's Hada Messia contributed to this report.