OPINION OF THE COURT
GARTH, Circuit Judge:
Frank Reese was transferred from Adams County Prison (ACP) in Gettysburg, Pennsylvania to the State Correctional Institution at Camp Hill on August 3, 1983. Reese subsequently filed a complaint in United States District Court, claiming that his transfer was instituted in retaliation for a prior civil rights action filed by Reese against Gary Sparks. Sparks answered and filed affidavits and documents in support of a motion for summary judgment. Reese failed to respond, and summary judgment in favor of Sparks was granted.
Reese then filed papers styled as an amended complaint, joining defendants James E. Caskey and Kenneth Sease and alleging that he, Reese, had been placed in solitary confinement and subsequently transferred to another institution (Camp Hill) as the result of a misconduct hearing at which he was not present and of which he had no notice. Reese claimed a violation of the due process guarantee of the fourteenth amendment and 42 U.S.C. § 1983.
The district court, in one order dated August 1, 1984, vacated its earlier grant of summary judgment, granted Reese’s motion to amend his complaint, then, treating the amended complaint as a response to Sparks’ original motion for summary judgment, entered another order of summary judgment in favor of Sparks, Caskey, and Sease.
It is from this second grant of summary judgment that Reese appeals. Because we conclude that the district court’s action in granting summary judgment without giving Reese an opportunity to respond by affidavits or other proofs was improper, and, alternatively, because we find that even the documents that were before the district court presented a genuine issue of material fact, we reverse and remand.
I.
According to Reese’s amended complaint, after an escape attempt by several prisoners at ACP, a disciplinary hearing was held on August 2, 1983. Reese had no notice of this hearing, nor was he given an opportunity to appear and be heard. According to Reese, as a result of this hearing he was first confined to special detention, then transferred to Camp Hill.
Sparks’ filings in support of his initial motion for summary judgment included an affidavit that Reese was implicated in the breakout attempt and that “[a] hearing was held for Mr. Reese concerning his transfer on August 2, 1983, following that hearing, Mr. Reese was transferred to the State Correctional Institution at Camp Hill.” Sparks’ papers included a copy of a Petition for Administrative Transfer of Reese pursuant to 61 Pa.S. 72, based on a security risk reclassification. The Petition for transfer was dated August 1, 1983 and approved by a Common Pleas judge on August 2, 1983. Sparks’ papers also included a document entitled “Misconduct Report,” evidencing an August 2, 1983 hearing. That report ordered that Reese immediately be placed in special detention at ACP and directed that Reese be transferred to Camp Hill on August 3, 1983. This “Misconduct Report” is signed by Caskey and Sease as “Hearing Board Members.”
II.
The district court failed to comply with the governing principles of Fed.R. Civ.P. 56 when it granted summary judgment against Reese on his amended complaint without first notifying Reese and giving him an opportunity to file supporting documents. “To exercise the right to oppose summary judgment, a party must have notice____ Although the court may dismiss the action at its own motion, it must first provide [the party] an opportunity to oppose an entry of summary judgment against him.” Bryson v. Brand Insulation, Inc., 621 F.2d 556, 559 (3d Cir. 1980). See also Davis Elliot International v. Pan American Container, 705 F.2d 705, 707 (3d Cir.1983).
Here, Reese filed an amended complaint, which changed not only the legal theory upon which he first sought relief, but also averred additional and different facts supporting his new theory. The district court accepted the amendment to the complaint; and vacated its prior grant of summary judgment. Yet the court at the same time immediately granted summary judgment, based on affidavits and documents previously filed by Sparks when Sparks moved against Reese’s initial complaint.
Thus, Reese was given neither notice nor an opportunity to file affidavits either in support of his amended complaint, or in response to Sparks’ affidavits and motion. Any notice Reese might have had of Sparks’ earlier motion for summary judgment addressed to Reese’s original complaint could not have informed Reese of his need to present affidavits or documents in support of his amended complaint.
Moreover, the theory and the facts asserted in Reese’s amended complaint differed materially from the theory and facts asserted in Reese’s initial complaint. In Reese’s first complaint, as we have observed, Reese claimed that he had been transferred by Sparks in retaliation for having filed a civil suit against Sparks. In Reese’s amended complaint Reese contended that his transfer was ordered on the basis of a misconduct proceeding, which under Pennsylvania law required that Reese be accorded a hearing. Reese also claimed that he had received disciplinary confinement without having been heard, again in violation of prison regulations.
Because of the peculiar sequence of events in which Sparks’ motion for summary judgment against the original complaint was granted, and because Reese had no further opportunity to oppose a grant of summary judgment against his amended complaint (a complaint against which Sparks had never moved), it is evident to us that the case must be remanded to the district court to give Reese an opportunity to oppose any motion that may be filed by Sparks addressed to Reese’s amended complaint. Cf. Bryson v. Brand Insulation, supra, (summary judgment may be granted by court sua sponte, provided, however, that notice has been afforded to party against whom judgment is contemplated),
III.
Even apart from the procedural irregularity of the grant of summary judgment against Reese’s amended complaint, we do not believe that the record and affidavits before the district court justified the second grant of summary . judgment for Sparks in this case. Summary judgment is appropriate only where “there is no genuine issue as to any material fact and ... the moving party is entitled to a judgment as a matter of law.” Fed.R.Civ.P. 56(c). In making the determination whether a genuine issue of material fact exists, all reasonable inferences from the affidavits must be drawn in favor of the non-moving party. Sun Refining and Marketing Co. v. Rago, 741 F.2d 670, 673 (3d Cir.1984).
The district court relied on the principle that a prisoner enjoys no due process right to a hearing prior to an administrative transfer from one prison to another, including a transfer for security reasons. Montanye v. Haymes, 427 U.S. 236, 96 S.Ct. 2543, 49 L.Ed.2d 466 (1976); Cobb v. Aytch, 643 F.2d 946 (3d Cir.1981) (in banc). See also Robson v. Biester, 53 Pa.Comm. 587, 420 A.2d 9 (1980). However, where the transfer is punitive, provisions of the Pennsylvania Code providing for notice and hearing prior to punishment for misconduct, create a protected liberty interest in remaining in the general prison population. That interest is entitled to procedural due process protections. Hewitt v. Helms, 459 U.S. 460, 103 S.Ct. 864, 74 L.Ed.2d 675 (1983) (relying on 37 Pa.Code § 95.104 (1978)).
It must be remembered that Reese claimed to have been transferred to Camp Hill not as a security or administrative transferee, but rather as a result of the August 2 misconduct proceeding at which he was improperly denied the right to be present. Thus, treating Reese’s amended complaint as an affidavit in opposition to summary judgment, as the district court treated it, Reese’s claim that the reason for his transfer was the misconduct report and not the administrative transfer petition, creates a genuine issue of material fact. The district court apparently did not recognize that Reese’s claim of a misconduct transfer contradicted Sparks’ contention that Reese’s transfer was of an administrative character. Rather than acknowledging that the disputed type of transfer had given rise to a material dispute of fact which would preclude the entry of summary judgment, the district court sought to reconcile and explain away the evident contradiction by saying:
It is unfortunate that the prison officials used a misconduct report form to present their recommendation that Plaintiff be transferred as a security risk. Use of such a form generally will imply that Plaintiff is being punished and that prison officials acting pursuant to the rules governing misconduct hearings, which may require minimum due process. In this case, though, it is clear that the Warden acted properly under 61 P.S. § 72 to transfer Plaintiff before any misconduct hearing occurred and that no hearing was necessary.
Reese v. Sparks, No. 83-1653 (M.D.Pa. (Aug. 1, 1984)), mem. op. at 6-7.
Because a misconduct charge requires a hearing that Reese was denied, and an administrative transfer requires no such process, it is evident that the dispute revealed by the petition for transfer on the one hand and Reese’s complaint on the other, is material and could not be resolved in the present summary judgment context. Indeed, the finding made by the district court that the transfer was an administrative transfer and not a misconduct transfer — a finding that is impermissible in a summary judgment proceeding — could only result if all inferences were drawn in favor of the moving party, and not the non-moving party. The coincidence in time (August 1 — Petition for Transfer; August 2 — misconduct proceeding and disciplinary confinement; August 3 — transfer) and the sequence of events (finding of misconduct, detention, and transfer) require, particularly when inferences must be drawn in favor of Reese, the non-movant, that this dispute as to the type of transfer responsible for Reese’s reassignment, not be resolved in a summary manner.
Thus, two additional reasons bar summary judgment against Reese’s claim. First, if Reese’s transfer actually resulted from a misconduct hearing held without notice or opportunity for Reese to attend and did not result from the administrative petition, judgment for Sparks is not justified. It is not disputed that Reese had no notice of, and no opportunity for, hearing. What is disputed is that Reese’s transfer was a misconduct transfer which required notice and a hearing. On this record, that issue was improperly decided by the district court in summary fashion.
Second, Reese has claimed without contradiction that he was punished in violation of the Pennsylvania Code by having been confined in special detention without the benefit of a hearing. Confinement to special detention is, unlike a transfer, inherently punitive, and thus within the rule of Hewitt v. Helms, supra, requiring a hearing. Thus, Cobb v. Aytch, supra, which is concerned with administrative transfers, is inapposite. Thus, absent an appropriate justification by the defendants for this action — and none appears in this record— summary judgment in favor of Sparks on the detention claim is also barred at this time.
IV.
The district court’s order dated August 1, 1984 which improperly grants summary judgment in favor of Sparks will be reversed and we will remand the case for further proceedings consistent with this opinion.
. 61 Pa.S. § 72 in relevant part provides:
The Deputy Commissioner ... is hereby authorized ... upon petition being presented to him.... by reason of existing conditions ... that a certain number of inmates, set forth in such petition, should be transferred therefrom, [to] make an order authorizing and directing the said ... official in charge, to transfer to another prison ... such person or persons ...; Provided, however, That before any transfer is made as aforesaid the court of common pleas of the county wherein any such penitentiary ... is located, shall give its consent to such transfer____
. 37 Pa.Code § 95.240 provides in relevant part that:
(3) Confinement is punishment, therefore no further punishment is permitted unless the prisoner violates the rules and regulations of the prison or violates State law.
(7) No prisoner shall be punished unless he has been informed of the offense alleged against him and given an opportunity to present his defense. In addition the following shall apply:
(i) The hearing shall be staffed by an impartial tribunal.
(ii) The hearing shall be preceded by notice to the prisoner, in writing, of the charges against him.
(iii) The decision reached shall be based upon evidence raised at the hearing.
(iv) The decision-makers shall state the reason for their determination of guilt if that is the decision reached.
(9) Punishment may fall into the two following categories:
(i) Loss of privileges.
(ii) Segregation.
. Reese concluded his amended complaint by adding the following declaration, "I declare under penalty of perjury that the foregoing is true and correct.”
. See 37 Pa.Code § 95.240(9), note 2, supra.
. Our rejection of a disposition based on summary judgment is naturally confined to the record before us. Nothing in this opinion would preclude a summary judgment disposition on an appropriate record after an opportunity for discovery and/or an opportunity to file additional affidavits has been afforded.
. We express no opinion as to any possible immunity that may be asserted by Sparks and the other defendants.