UEFA Champions League: Roma 0 Man City 2
A dramatic Sergio Aguero hat-trick in the 3-2 win over group winners Bayern Munich last time out had kept City in the hunt for the second qualification place, despite a largely lacklustre campaign.
And despite their talisman's absence with a knee injury on Wednesday, Manuel Pellegrini's team recovered from a shaky start at the Stadio Olimpico to produce their most assured European performance of the season against a Roma team that lacked ideas in attack.
By contrast, Nasri buzzed inventively throughout for City and his wonderful 60th-minute effort cannoned home off the upright.
A post came to City's rescue 11 minutes later when Joe Hart got a decisive fingertip onto Kostas Manolas' header and, with Bayern beating CSKA Moscow 3-0 in Germany, their progress to the knockout stages was confirmed when Nasri set up Pablo Zabaleta to score a second four minutes from time.
Former England defender Ashley Cole was unable to win a place in Roma's matchday squad, while experienced midfielder Daniele De Rossi was only named as a substitute.
Edin Dzeko led the City attack as Aguero began his recuperation - the Argentine forward leading a high-profile list of absentees that also included Vincent Kompany (hamstring) and Yaya Toure (suspension), while David Silva returned to the visitors' bench after a knee problem.
Joe Hart took the captain's armband with Kompany missing and the goalkeeper spread himself to make a fine close-range save in the fifth minute as Jose Holebas sprung the City offside trap.
A nervy opening for Pellegrini's defence continued as Radja Nainggolan burst down the left channel and Eliaquim Mangala made a vital clearance with Gervinho poised to convert.
James Milner had a low 20th-minute drive pushed away by Morgan De Sanctis but Hart produced an even better stop from Gervinho when Roma sprung forward immediately on the counter-attack.
Dzeko lacked conviction when he stabbed a shot over under pressure on the end of fine interplay between Nasri and Jesus Navas, and the latter then crossed for the Bosnia striker to glance wide in the 29th minute as City grew into the contest.
The lively Gervinho shot wastefully at Hart having raced through on an increasingly rare Roma attack and City responded, with De Sanctis out quickly to deny Milner after Nasri’s 39th-minute pass.
Hart kept Miralem Pjanic's long-range strike out of the bottom corner in the 58th minute amid a cagey opening to the second half that was soon interrupted by Nasri.
There appeared to be little on when the Frenchman drifted in from the left flank but he whipped a shot past the sprawling De Sanctis and in off the near post.
Nainggolan forced Hart to push a rasping shot over at the other end before the in-form Adem Ljajic turned Zabaleta inside out to blast off target in the 67th minute.
It was becoming an increasingly accomplished night for Hart as he did just enough to deny Manolas, although Martin Demichelis came to his goalkeeper's rescue from the resulting corner - clearing off the goalline.
Roma poured forward in search of the two goals they needed to go through at City's expense late on, but that meant gaps at the back and when Nasri calmly rolled a pass into Zabaleta's path with four minutes left, the marauding right-back settled the issue.