In a race in which he’s looking for every last vote, Democratic State Senate primary contender Joe Fritz even has reached back to the nuns who taught him in grade school.

“I got one letter back from Sister Leonard Marie,” said Fritz, 71, a veteran Brentwood civic activist and lawyer who is vying with former Suffolk Legis. Rick Montano and law school student John De Vito in a party primary. “She wished me well but told me my other teachers will be voting for me from heaven.”

Fritz’s scramble for even a handful of votes is typical of grass-roots efforts underway in Tuesday’s Democratic primaries for five State Legislature seats Islandwide, in which voters will pick their parties’ candidates for the Nov. 8 ballot.

In other Suffolk Democratic primaries, Giovanni Mata is challenging Assemb. Phil Ramos in the 6th District, while local activist Jordan Wilson is vying with freshman Assemb. Kimberly Jean-Pierre in the 11th Assembly District.

In Nassau, Assemb. Earlene Hooper is facing a Democratic primary from challenger Carmen Piñeyro in the 18th District, while former Nassau Legis. Jeff Toback is facing Anthony Eramo in a Democratic primary in the 20th.

Nassau also has an eight-way Reform Party Family Court primary for four ballot lines, and a four-way Second District Court Reform Party primary for two seats.

In Southampton, there also are Conservative and Working Families primaries for one town justice post.

Also, in Manhattan, there is a six-way Democratic primary fight to succeed Sheldon Silver, the longtime Assembly leader who was convicted on corruption charges a year ago.

Following is a rundown of the state legislative contests in Nassau and Suffolk counties:

Third State Senate District

The contest pits a political newcomer against two longtime party veterans who are vying for the right to take on freshman GOP State Sen. Tom Croci in November.

John De Vito, a first-time office-seeker, has raised $81,000 and has the backing of the Brookhaven Democratic executive committee.

De Vito, 25, says voters are looking for “new blood” to clean up zombie properties, bring more aid to the district and clean up public corruption in Albany. He wants to ax pensions for politicians convicted of crimes and bar outside income for lawmakers.

De Vito began as a volunteer for Suffolk County Legis. Kate Browning’s campaign and later worked as an aide to ex-Rep. Anthony Weiner (D-Brooklyn/Queens), who resigned after a sexting scandal. De Vito has finished two years of law school, but says he is taking a sabbatical to campaign.

Joe Fritz, who says he is spending about $15,000 of his own money to campaign, criticized De Vito as a “law school dropout” who has no track record on issues. Fritz cites his own record of fighting for tax relief for those living near zombie properties and tainted parklands.

Fritz also said he has actively opposed the proposed 9,100-unit Heartland project in Brentwood, saying it would prompt drastic hikes in school taxes.

Fritz also criticized Rick Montano for taking $5,000 in contributions from Heartland developer Jerry Wolkoff while remaining silent on the development issue.

Montano, 66, called Fritz’s claims overblown, noting that the contributions from Wolkoff were small and made over the decade Montano served as a Suffolk County lawmaker.

“People in the community know who I am and what I’ve done,” said Montano, a maverick who has taken on local Democratic Party leaders. Montano also worked as an assistant state attorney general and executive director of the Suffolk Human Rights Commission.

Montano, who has spent about $5,000 of his own money so far, cites his record of backing measures that overhauled the county ethics board and made parents responsible for parties where alcohol is served to minors. Montano backs making the job of state legislator full time with no outside income and proper funding for local school districts.

6th Assembly District

Democrat Giovanni Mata is making his third bid to oust 14-year Assemb. Phil Ramos (D-Brentwood), with unsolicited help from a pro-charter school group that flooded the district with negative mail attacking Ramos.

Mata, 37, has reported $8,249 in-kind help with palm cards and web services, while the super PAC New Yorkers for Independent Action, disclosed spending $321,262 on Mata’s behalf in its 11-day pre-primary campaign finance filing.

Mata, a commercial insurance salesman for Northwell Health, said he supports more state funding for public schools, particularly for local districts that have had to accommodate unaccompanied minors from other countries. Mata said he has no position on charter schools.

Ramos said he has helped empower the community and brought home funding from Albany, including $2 million for the pool at Roberto Clemente Park in Brentwood.

Ramos has done eight mailings of his own. The Fund for Great Public Schools, backed by the state teachers union, also has done anti-Mata mailings.

Robert Bellafiore, a spokesman for New Yorkers for Independent Action, defended their spending, saying, “Black and brown parents are desperate for real school options so their kids can have a better chance in life. Mr. Ramos is saying no to them and that’s wrong.”

Ramos said the group is retaliating against him for his successful efforts to block charter schools in Islip. He says local residents oppose charters, and that such schools would reduce funding for public schools.

11th Assembly District

Kimberly Jean-Pierre, 32, seeking a second Assembly term, is facing Jordan Wilson, 53, a longtime Democratic activist.

Wilson, a mental health counselor from North Babylon, says he is waging a primary “as a public service” because Republicans failed to name an opponent to Jean-Pierre.

Wilson supports free tuition for community college students, longer hours at community centers to provide counseling, and additional money to improve infrastructure.

Jean-Pierre said she has helped restore state aid for schools that was lost during the Wall Street meltdown, and brought extra aid to community groups to help area youth.

She also said she is concentrating on bringing jobs to the district while reducing recidivism and crime.

Wilson, who has run losing races for county comptroller and county legislature, criticized Jean-Pierre for “poor judgment” in taking pay of $7,384 from the Suffolk Democratic Committee at the same time she is working for taxpayers as a $79,500-a-year lawmaker.

“She’s the greatest magician since Harry Houdini being in two places as the same time,” Wilson said.

Jean-Pierre noted that her party stipend is small and has not influenced her, and noted that she supported caps on state lawmakers’ outside income.

“I’m not hiding anything; I’m being very transparent,” she said.

18th Assembly District

Deputy Assembly Speaker Earlene Hooper, 77, of Hempstead, who has served 14 terms representing the 18th District, faces a rare Democratic primary opponent in Freeport Trustee Carmen Piñeyro, 40, of Freeport.

Hooper, a former state social worker, has faced resistance from Democratic leaders in the district as she pushed legislation to transfer the old Freeport Armory to a nonprofit group that would offer programs for at-risk youth. Gov. Andrew M. Cuomo vetoed Hooper’s bills in 2013 and 2014 and she has continued to introduce the legislation in the past two years without success.

Hooper, who did not respond to multiple requests for comment, has said she wants to get the armory “into the hands of the community, where it can do the most good.”

Piñeyro, who has served two terms as a Freeport Village trustee and works as chief compliance officer of United Northern Mortgage Bankers in Levittown, says Freeport needs the former National Guard facility to store public works equipment.

Freeport’s Department of Public Works yard flooded during superstorm Sandy, and federal officials have told the village they will not be reimbursed if the equipment is damaged in a future storm. “We need to move this equipment to higher ground to protect the equipment and to have access to it during an emergency,” Piñeyro said.

Hooper, who has been endorsed by the Nassau Democratic Party, has raised $19,305, spent $10,283 and has $15,365 on hand, according to state Board of Election records.

Piñeyro, who has the backing of several progressive groups and labor unions, has raised $76,689, including $25,709 transferred from her Freeport account, spent $38,061 and has $38,627 available.

20th Assembly District

Long Beach City Councilman Anthony Eramo and former Nassau Legis. Jeff Toback are in a heated Democratic primary for a seat vacated in April when Todd Kaminsky, who is supporting Eramo, was elected to the State Senate.

The Nassau Democratic Party and several private-sector labor unions are backing Eramo, 42, a two-term councilman.

Eramo says he wants increased state resources to reduce nitrogen levels in Reynolds Channel and to harden infrastructure in the district — which stretches from Long Beach to the Five Towns — in the wake of superstorm Sandy.

A Verizon field technician and chief steward of CWA Local 1106, Eramo supports several traditional Democratic issues, including prohibiting state lawmakers from earning outside income and banning tax breaks for companies that move jobs overseas.

Toback, 56, a Long Beach attorney who served five terms in the county legislature and ran unsuccessfully for the Assembly seat in 2010, has run an outsider’s campaign, pushing issues favored by Republicans and opposed by many Democrats.

Toback supports legislation allowing prosecutors to charge drug dealers with a homicide if there is deadly overdose from narcotics they’ve sold.

He backs term limits for state lawmakers but opposes a ban on outside income, saying that would limit the diversity of the state legislature.

Eramo has raised $148,103, including $18,632 transferred from his Long Beach account, spent $50,232 and has $97,872 on hand, according to state Board of Election records. Toback has raised $36,403, spent $14,242 and has $22,160 available.

With Sid Casseseand Yancey Roy

Suffolk conflict of interest … Ash dumped at Brookhaven landfill … St. Michael's named town landmark Credit: Newsday

North Amityville shed fire ... Suffolk conflict of interest ... Suozzi back in Congress ... Students learn hip hop history 

Suffolk conflict of interest … Ash dumped at Brookhaven landfill … St. Michael's named town landmark Credit: Newsday

North Amityville shed fire ... Suffolk conflict of interest ... Suozzi back in Congress ... Students learn hip hop history 

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months