NEW YORK (AP) _ Massachusetts Gov. Deval Patrick, his state's first black governor and a close ally of presidential candidate Barack Obama, is writing a memoir that will be published by Broadway Books in 2010.

The deal is worth $1.35 million and nine publishers competed for the book, currently untitled, according to agent Todd Shuster of the Zachary Shuster Harmsworth Literary Agency. Patrick will donate some of his royalties to A Better Chance, a nonprofit educational organization that helped Patrick attend the Milton Academy, south of Boston.

"Drawing upon his extraordinary journey from Chicago's Wabash Avenue to the Massachusetts State House on Boston's fabled Beacon Hill, Gov. Patrick will offer in his book a series of lessons and insights on life and leadership," according to a statement released Friday by Broadway Books, an imprint of Random House, Inc.

"Among the subjects he will address are self-truth, grace, faith, courage, and compassion, as well as the importance of forgiveness, and embracing optimism and hope to make good outcomes possible."

Obama, a black Illinois senator who wrote "Dreams From My Father" and "Audacity of Hope," is similar to Patrick in several ways: Both are Democrats who graduated from Harvard Law School, have Chicago ties and ended up seeking elective office on the strength of their backgrounds.

Patrick, 51, was out of state last week when his casino gambling plan, a cornerstone of his economic program, went down to defeat, leading to speculations about his whereabouts: He was in New York, shopping his book.

Patrick briefly became an issue in the presidential campaign when it was discovered that Obama had been using some of his lines, saying that while words matter, actions mean more, leading Obama's rival, Sen. Hillary Clinton, to call him the candidate of "change you can Xerox."

Patrick, one of Obama's strongest supporters, dismissed the charges as "sort of a tempest in a teapot."

Copyright 2008 The Associated Press.