Updated

Barack Obama's controversial pastor and the church he's served for 36 years may be in hot water over statements he has made from the pulpit in support of the Illinois senator's run for the White House.

The Rev. Jeremiah Wright Jr. preaches that he follows the righteous path, but when it comes to the federal tax law, his Trinity United Church of Christ may have crossed the line.

Wright praised Obama from the pulpit on Jan. 13 in what was billed as his final sermon at the Chicago church.

"There is a man here who can take this country in a new direction," Wright said during his sermon, according to recordings obtained by FOX News.

It was not the first time Wright appeared to endorse Obama, who was baptized at Trinity United, has been an active member of the church for two decades and receives spiritual mentorship from Wright.

The title of Obama's second book, "The Audacity of Hope," was taken from a sermon by Wright.

During a Christmas sermon, Wright tried to compare Obama's upbringing to Jesus at the hands of the Romans.

"Barack knows what it means living in a country and a culture that is controlled by rich white people," Wright said. "Hillary would never know that.

"Hillary ain't never been called a nigger. Hillary has never had a people defined as a non-person."

In his Jan. 13 sermon, Wright said:

"Hillary is married to Bill, and Bill has been good to us. No he ain't! Bill did us, just like he did Monica Lewinsky. He was riding dirty."

FOX News purchased the video recordings of Wright's sermons from the church.

"It's pretty clear an indirect endorsement of Barack Obama — that's not something you're supposed to do according to the tax code," said Andrew Walsh, a professor at Trinity College who specializes in religion in politics.

The tax code bans churches from participating in or intervening in a political campaign. Violations can result in the loss of a church's tax exempt status.

The Obama campaign issued a statement in response to FOX News' inquiries about Wright's sermons.

"Senator Obama has said repeatedly that personal attacks such as this have no place in this campaign or our politics, whether they're offered from a platform at a rally or the pulpit of a church," said Bill Burton, a campaign spokesman.

"Senator Obama does not think of the pastor of his church in political terms. Like a member of his family, there are things he says with which Senator Obama deeply disagrees."

Click here to visit Trinity United Church of Christ Web site.

Obama defended Wright's longtime activism for blacks in America last week at a campaign event in Ohio.

"Jeremiah Wright ... has said some things that are considered controversial because he's considered that part of his social gospel," Obama said.

The Internal Revenue Service wouldn't comment on whether it is looking into potential tax violations at Trinity United. The church declined to make Wright available for an interview.

Congregant Dwight Hopkins, a professor of Theology at the University of Chicago, said there is no basis for the IRS to go after the church.

"From the church side they will say it's theology," said. "If it wasn't a senator running for president and it wasn't his church, then I think we could say all kinds of things."

The IRS has written dozens of letters warning churches against political advocacy from the pulpit. Yet it has revoked a church's tax-exempt status only twice in the last half-century.

Walsh said it's not typical for the IRS to enforce the rules.

"There's a tension here between the desires of the religious leaders to say important things in the public marketplace and the IRS rules, and so most of the time, the IRS does not enforce these rules," Walsh said.

The public scrutiny of these sermons comes in the wake of last month's revelation by the head of the United Church of Christ that the IRS is investigation a speech Obama gave at the denomination's national conference last year in Connecticut.

In a certified letter, Marsha Ramirez, IRS director, EO Examinations, wrote:

"Our concerns are based on articles posted on several Web sites including the church's which state the United States Presidential Candidate Senator Barack Obama addressed nearly 10,000 church members gathered at the United Church of Christ's biennial General Synod at the Hartford Civic Center, on June 23, 2007. In addition, 40 Obama volunteers staffed campaign tables outside the center to promote his campaign."

The church and the Obama campaign have denied that any inappropriate political advocacy occurred during this speech.

Wright's sermons often address themes of white supremacy and black repression, and critics have called them racially divisive.

Some remarks attributed to Wright that have been posted on the Internet and cited in press accounts include:

“Fact number one: We’ve got more black men in prison than there are in college.

"Fact number two: Racism is how this country was founded and how this country is still run.

"We are deeply involved in the importing of drugs, the exporting of guns and the training of professional killers. ... We believe in white supremacy and black inferiority and believe it more than we believe in God. ... We conducted radiation experiments on our own people. ... We care nothing about human life if the ends justify the means.

"And ... And ... And! God! Has got! To be sick! Of this shit!"

Click here to hear an audio clip of the Rev. Jeremiah Wright Jr. WARNING: Contains offensive language.

Once Wright's remarks were widely publicized last year, Obama backed out of his plans for his pastor to speak at his Feb. 10 presidential announcement.

Obama met Wright after college while working with local churches in Chicago to tackle problems of drug abuse and unemployment in inner-city neighborhoods. Wright preached an Afrocentric theology that interpreted the Bible through shared suffering of African Americans.

For Obama, this experience was a spiritual turning point. He has written that he had been exposed to various faiths during his life but never formally adopted one until after meeting Wright.

“Inside the thousands of churches across the city, I imagined the stories of ordinary black people merging with the stories of David and Goliath, Moses and Pharaoh, the Christians in the lion’s den, Ezekiel’s field of dry bones,” he wrote in his memoir, "Dreams From My Father: A Story of Race and Inheritance."

“Those stories — of survival, and freedom, and hope — became our story, my story.”