This is an appeal from the judgment of sentence for four counts of unlawful delivery of a controlled substance, 35 P.S. § 780-113(f)(1.1), and two counts of criminal conspiracy. Appellant contends that his sentence was excessive. For the reasons that follow, we vacate the judgment of sentence and remand for resentencing.
Appellant pled guilty to the above-stated charges following a hearing on September 24, 1986. The offense of unlawful delivery of a controlled substance is graded as a felony and carries an offense gravity score of four. See Sentencing Guidelines, 204 Pa.Code § 303.8(c)(3), reprinted following 42 Pa.C.S.A. § 9721. He was assigned a prior record score of zero. See Sentencing Hearing, N.T. November 12, 1986 at 7. The recommended ranges for sentencing *192that correspond to these scores are the following: standard range — zero-to-twelve months; aggravated range — twelve-to-eighteen months; mitigated range — non-confinement. 204 Pa.Code § 303.9(b). Appellant was sentenced to four consecutive two-to-five-year terms of imprisonment for the four counts of unlawful delivery of a controlled substance, and two two-to-five-year terms of imprisonment for conspiracy to run concurrently with the other sentences. He also was fined $10,000 and ordered to pay $3,300 restitution. Appellant filed a motion to modify his sentence alleging that it was excessive. His motion was denied, and this appeal followed.
Initially, we note that a defendant does not have an appeal as of right from the discretionary aspects of his or her sentence for a felony or misdemeanor. Section 9781 of the Sentencing Code, 42 Pa.C.S.A. §§ 9701-9781, provides in relevant part as follows:
The defendant or the Commonwealth may file a petition for allowance of appeal of the discretionary aspects of a sentence for a felony or a misdemeanor to the appellate court that has initial jurisdiction for such appeals. Allowance of appeal may be granted at the discretion of the appellate court where it appears that there is a substantial question that the sentence imposed is not appropriate under this chapter.
Id. § 9781(b). The notice of appeal, see Pa.R.A.P. 902, operates as a “petition for allowance of appeal.” See Pa.R.A.P. 341 note; Pa.R.A.P. 902 note. See also Commonwealth v. Drumgoole, 341 Pa.Superior Ct. 468, 472-73, 491 A.2d 1352, 1353-54 (1985). “In effect, the filing of the ‘petition for allowance of appeal’ contemplated by [§ 9781] is deferred by these rules until the briefing stage____” Pa.R.A.P. 902 note. Pa.R.A.P. 2119(f) provides as follows:
An appellant who challenges the discretionary aspects of a sentence in a criminal matter shall set forth in his brief a concise statement of the reasons relied upon for allowance of appeal with respect to the discretionary aspects of a sentence. The statement shall immediately precede the *193argument on the merits with respect to the discretionary aspects of sentence.
Id. See also Commonwealth v. Tuladziecki, 513 Pa. 508, 511, 522 A.2d 17, 18 (1987) (error for court to address merits of appeal from discretionary aspect of sentencing when appellant failed to comply with Pa.R.A.P. 2119(f)).
In Commonwealth v. Easterling, 353 Pa.Superior Ct. 84, 509 A.2d 345 (1986), we held that if one of the following circumstances is before us, then appellant has presented a substantial question that the sentence imposed was not appropriate and we may grant allowance of the appeal:
(1) the sentencing court purported to sentence within the sentencing guidelines but applied the guidelines erroneously;
(2) the sentencing court sentenced within the sentencing guidelines but the case involves circumstances where the application of the guidelines would be clearly unreasonable; or
(3) the sentencing court sentenced outside the sentencing guidelines and the sentence is unreasonable.
Id., 353 Pa.Superior Ct. at 89, 509 A.2d at 348 (quoting 42 Pa.C.S.A. § 9781(c)).
Here, appellant alleges in his brief that we should allow his appeal because the lower court sentenced him outside of the Sentencing Guidelines and the sentence is unreasonable. From appellant’s statement, it “appears that there is a substantial question that the sentence imposed is not appropriate under [the Sentencing Code].” 42 Pa.C.S.A. § 9781(b). We shall therefore allow appellant’s appeal.
Appellant contends that the lower court abused its discretion in sentencing him outside of the guideline ranges without considering any factors other than the nature of the crime. We agree. Sentencing is within the sound discretion of the sentencing court and we will not disturb the sentence absent an abuse of that discretion. Commonwealth v. Terrizzi, 348 Pa.Superior Ct. 607, 609, 502 A.2d 711, 712 (1985). Our Supreme Court has held that the sentencing court must state, on the record, its reasons for *194the sentence to enable a reviewing court to ascertain “whether the sentence imposed was based upon accurate, sufficient and proper information.” Commonwealth v. Riggins, 474 Pa. 115, 131, 377 A.2d 140, 148 (1977). See also 42 Pa.C.S.A. § 9721(b) (court must disclose in open court at time of sentencing, reason(s) for sentence imposed). Moreover, when the sentence is outside of the guideline ranges, the court must provide a contemporaneous written statement of the reasons for deviation from the guidelines. Id.
In selecting an appropriate sentence, a court is required to consider the protection of the public, the gravity of the offense, and the rehabilitative needs of the defendant. Id. When imposing a sentence of total confinement, the court must consider the history, character, and condition of the defendant as well as the nature and circumstances of the crime. Id. § 9725. These sentencing provisions make it clear that a court may not consider the nature and circumstances of the crime to the exclusion of all other factors in imposing a sentence. Accord Commonwealth v. Peters, 358 Pa.Superior Ct. 94, 97, 516 A.2d 1197, 1199 (1986); Commonwealth v. Arent, 352 Pa.Superior Ct. 520, 523, 508 A.2d 596, 597 (1986). We also note that the sentencing court’s reasons for a particular sentence must be given contemporaneously with the imposition of the sentence. A more extensive explanation in an opinion filed pursuant to Pa.R.App.P. 1925(a) will not cure a failure to articulate reasons at the time of sentencing. See Commonwealth v. Holler, 326 Pa.Superior Ct. 304, 308-09, 473 A.2d 1103, 1106 (1984).
Here, the sentencing court stated that it intended to sentence appellant outside of the guideline ranges for the following reason:
We feel that the crimes are obviously quite serious, selling cocaine. It involves large quantities. This is no ten or 30 or $40.00 packet and it was over a period of time which indicates a certainly continuing activity. I also note the guidelines themselves state that in drug cases, it *195may well be that the crimes may warrant a sentence more severe than otherwise in drug cases and we intend to therefore go beyond the guidelines for the reason stated.
N.T. November 12, 1986 at 10-11. The court stated no other reasons for its imposition of a lengthy sentence of confinement and fine. The record discloses that the court failed to consider appellant’s history, character, condition, or any mitigating factors that might have been presented. After reviewing the transcript of the sentencing proceeding, we conclude that the court abused its discretion in focusing on the nature of the crime to the exclusion of any other factor relevant to sentencing. Accordingly, we vacate the judgment of sentence and remand for resentencing consistent with this opinion.
Judgment of sentence vacated and case remanded. Jurisdiction is relinquished.