They controlled the game from the off, opening the scoring when Kyle Bennett fired home from 20 yards.
Michael Doyle hit the bar from range for the visitors, who doubled their lead when a Ben Davies cross was turned into his own goal by Matt Pearson.
Pompey's Doyle did score, volleying beyond Jason Mooney from 30 yards, before Shay McCartan pulled one back.
The result means Stanley are down to sixth, while Paul Cook's side are now six points off the final automatic promotion place.

No suspicious packages were found and passengers were being allowed back in the terminal buildings.
Earlier, flights were on hold after the airport received a "very specific threat" by phone at 14:00 (19:00 GMT).
Local news channel KENS 5 reported that one flight was diverted, three cancelled, and 28 delayed.
As the airport was reopened, officials warned there was heavy road traffic in the surrounding area.
While the airport was closed local news sources reported that dogs trained to detect bombs raised suspicions over three cars in an airport car park, indicating there could be explosives inside.
Airport officials confirmed that all three cars were eventually cleared.
Meanwhile, passengers were herded onto the runways, away from the airport buildings, before they were taken to a nearby high school while the search was under way.
About 2,000 passengers were cleared out of the airport during the evacuation, Fire Department spokeswoman Deborah Foster told the Associated Press.
The incident was brought to officials' attention at about 14:00, and the airport tweeted confirmation that it was evacuating the terminal buildings at 14:35.
San Antonio International Airport handles about 260 flights, carrying between 14,000 and 15,000 passengers each day, airport spokesman Rich Johnson said.
The spokesman said incoming planes landed they were directed away from the airport buildings.
Other planes were also asked to wait on runways, the spokesman said.

Stevenage goalkeeper Jamie Jones was tested by Rowan Liburd's header and Garry Thompson's strike from 20 yards.
Boro's Tom Conlon had a shot over the crossbar before Jason McCarthy missed the target and Liburd had more chances.
The winner came from McCarthy's shot rebounding to Luke O'Nien, who slotted home, while Stevenage almost equalised from 10 yards though Dean Parrett.
Stevenage remain in 21st, seven points clear of the relegation zone.

Women's rights activists held a rally outside the parliament building in Warsaw, with more action expected on Monday.
Poland's MPs rejected a near-total ban on abortions on 6 October after mass protests against the move.
But there are new proposals to outlaw abortions in cases where foetuses are unviable or badly damaged.
Jaroslaw Kaczynski, leader of the governing Law and Justice Party (PiS), has said his socially conservative party is working on a new restrictive bill.
In an interview on 12 October (in Polish), he said: "We will strive to ensure that even in pregnancies which are very difficult, when a child is sure to die, strongly deformed, women end up giving birth so that the child can be baptised, buried, and have a name."
Why the outcry over abortion laws in Poland?
The Catholic country already has among the tightest abortion laws in Europe. Currently the procedure is only permitted when there is severe and irreversible damage to the foetus, or a serious threat to the mother's health, or when pregnancy is the result of rape or incest.
The draft law that went before Poland's parliament earlier in October called for women who had abortions to be punished with a five-year prison term. Doctors found to have assisted in an abortion would have also been liable for jail time.
But it was defeated after nationwide "Black Monday" protests that saw tens of thousands of people dressed in black - most of them women - take to the streets.
Women also stayed away from work and school and refused to do domestic chores, in a protest inspired by a women's strike in Iceland in 1975.
Sunday's street protests are expected to continue on Monday, when some women are also planning another strike.
Activists warn that more restrictions on abortion would drive the practice further underground.
Estimates say there are already far more illegal abortions than legal ones in Poland - between 10,000 and 150,000, compared with about 1,000 or 2,000 legal terminations.
Portsmouth scored three first-half goals away at Accrington to move above them into fourth in League Two.
[NEXT_CONCEPT]
The international airport in San Antonio, Texas, has reopened several hours after it evacuated passengers and searched for an alleged bomb threat.
[NEXT_CONCEPT]
Wycombe Wanderers secured a narrow win over Stevenage to move up to eighth and sit one point from the play-off places.
[NEXT_CONCEPT]
Polish protesters have launched fresh demonstrations against efforts to further tighten abortion laws.