Tom Brady
Tom Martinez, the longtime coach and mentor of New England Patriots quarterback Tom Brady, died of a heart attack on Tuesday in California. He was 67. REUTERS/Luke MacGregor

Tom Martinez, the longtime coach and mentor of New England Patriots quarterback Tom Brady, died of a heart attack on Tuesday in California.

ESPN Boston reported that Martinez's wife, Olivia, told the San Mateo Daily Journal that her husband died after suffering a heart attack while he was receiving dialysis treatment.

He was (67) and along with wife, Olivia, leaves three children . . . their spouses . . . six grandchildren and hundreds of young athletes in the Bay Area and around the country, Olivia Martinez wrote in an e-mail to the Daily Journal.

On Tuesday night, the New England Patriots took to its Twitter account to offer condolences to the family.

Our sincere condolences go out to the Martinez family & all those he mentored throughout his incredible career, the post read.

The team later retweeted a post from Julian Edelman, a wide receiver for the team, which read RIP coach Tom Martinez. He was such a great mentor to many in the bay area. His legacy will always live on.

The Daily Journal reported that last spring, doctors told Martinez that he had months or less to live because of a combination of kidney and heart problems. Specialists later found that it was Martinez's pacemaker that was killing him. Martinez's pacemaker was turned off in June and he battling to gain strength as he awaited a kidney transplant.

Martinez worked with Brady when he was a teenager growing up in San Mateo, The Associated Press reported. Martinez coached at College of San Mateo at the time and his relationship with Brady continued into the quarterback's NFL career.

Before the 2012 Super Bowl finals between the Patriots and the New York Giants, Martinez told the San Francisco Chronicle that he enjoyed working with Brady and watching him play.

Brady told reporters that Martinez was the one who taught him how to throw a football. Brady said he was forever indebted to him.

He's been a great friend of mine for a long time, Brady said, as reported by The AP. He also noted that Martinez was in need of a kidney for some time now.

A spokesman for the Patriots told The AP that Brady could not be reached for comment.

The Daily Journal reported that Martinez had 400 career wins in football, a state record 565 wins in basketball and 800 wins in softball over 32 years.

College of San Mateo athletic director Gary Dilley told the media that it's great that Martinez made such a great contribution to Tom Brady, but really the mark he made was in the hearts he trained and coached at CSM.