
117 Cal.App.3d 654 (1981)
172 Cal. Rptr. 856
THE PEOPLE, Plaintiff and Respondent,
v.
RONALD DOUGLAS JACKSON, Defendant and Appellant.
Docket No. 38199.
Court of Appeals of California, Second District, Division Four.
April 1, 1981.
*657 COUNSEL
Joseph F. Walsh, under appointment by the Court of Appeal, for Defendant and Appellant.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Norman H. Sokolow and Timothy E. Cary, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WOODS, J.
As the result of a "plea bargain" effected by means of a submission upon the transcript of his preliminary hearing (see In re Mosley (1970) 1 Cal.3d 913 [83 Cal. Rptr. 809, 464 P.2d 473]), defendant Ronald Jackson was convicted of possessing piperidine and cyclohexanone with intent to manufacture phencyclidine (Health & Saf. Code, § 11383, subd. (b); count I) and possessing phencyclidine for purposes of sale (Health & Saf. Code, § 11378; count II).[1] He contends: "1. The court erred in denying appellant's motion to suppress evidence which was brought on the grounds that the deputy marshal failed to comply with the knock and notice provisions prior to a forced entry into appellant's apartment. II. The court erred in sentencing appellant."


*658 I
Uncontroverted evidence[2] establishes that after personally presenting appellant on September 19, 1978, with a five-day notice to vacate unit number 3 at 4024 Abourne Road, Los Angeles County Deputy Marshal David Long returned to that location on October 5 with his partner to execute a writ of possession.
Long knocked on the door and announced, "`We're here with a court order for your eviction. Please open the door.'" After receiving no response he looked through a small hole chipped out of the door and observed appellant, who was inside the residence, look in his direction. When appellant failed to respond to the request, Long knocked again and advised appellant they would "have to have a locksmith pick the lock" if he did not open the door. Appellant once more disregarded the deputy's demand. A locksmith was called and arrived a few minutes later. He succeeded in opening the lock.
The officers and the owner of the property entered and appellant was ordered to vacate the premises. Deputy Long thereafter obtained the owner's permission to open a locked closet door, from which was emanating a strong ether odor, a smell the officer had first noticed while still outside the apartment. The owner also granted the officers permission to search the area for any additional persons or weapons that might be present.[3] Large quantities of phencyclidine and chemicals used in the manufacture of phencyclidine were recovered.
(1) We agree with appellant that a deputy marshal entering a house pursuant to a writ of possession issued in a civil proceeding must, prior thereto, give notice of his authority and purpose in a manner similar to that required under Penal Code sections 844 and 1531. Although Penal Code sections 844 and 1531 both make express reference to the authority of a police officer to effect forcible entry, the requirement of prior notice of authority and purpose before forcing entry into a home is deeply rooted in our heritage. (Miller v. United States (1958) 357 U.S. 301, 313 [2 L.Ed.2d 1332, 1340, 78 S.Ct. 1190].) "As early as Semayne's Case, 5 Co Rep 91a, 91b, 77 Eng Rep 194, 195 (1603), it *659 was declared that `[i]n all cases when the King is party, the sheriff (if the doors be not open) may break the party's house either to arrest him, or to do other execution of the K[ing]'s process, if otherwise he cannot enter. But before he breaks it, he ought to signify the cause of his coming, and to make request to open doors. ...'" (Ker v. California (1963) 374 U.S. 23, 47 [10 L.Ed.2d 726, 746, 83 S.Ct. 1623] (opinion of Brennan, J.); see also People v. Valdivia (1980) 114 Cal. App.3d 24, 27 [170 Cal. Rptr. 431].)
Penal Code sections 844 and 1531 were enacted to protect the privacy of the individual in his home, and to insure the safety of police, innocent bystanders and occupants who may be injured as the result of violent resistance to unannounced entries into private dwellings. (Duke v. Superior Court (1969) 1 Cal.3d 314, 321 [82 Cal. Rptr. 348, 461 P.2d 628].) The sections facially apply only to an entry made to effect an arrest or to execute a search or arrest warrant, but the purposes of the statutes indicate that they should apply also to an entry made to serve a notice of eviction. (See, e.g., People v. King (1971) 5 Cal.3d 458, 464, fn. 3 [96 Cal. Rptr. 464, 487 P.2d 1032]; People v. Glasspoole (1975) 48 Cal. App.3d 668, 677 [121 Cal. Rptr. 736].)
Compliance with those sections requires that officers knock or use other means reasonably calculated to give adequate notice of their presence to the occupants, and identify themselves as police officers. (Duke v. Superior Court, supra, 1 Cal.3d at p. 319.) (2) In the instant case, the requirements of the statutes were satisfied. Deputy Long informed defendant of the purpose of his visit and effectively communicated that he sought admittance to discharge his duties as a law enforcement officer. His identity was already known to appellant, whom he had served with a notice to vacate 15 days earlier. (See Greven v. Superior Court (1969) 71 Cal.2d 287, 293 [78 Cal. Rptr. 504, 455 P.2d 432].)

II
(3) Appellant's claim that the abstract of judgment must be corrected as a result of a sentencing error is well taken. (See In re Candelario (1970) 3 Cal.3d 702, 705 [91 Cal. Rptr. 497, 477 P.2d 729].) At appellant's probation and sentencing hearing on April 30, 1980, the trial court properly exercised its discretion and ordered imposition of the middle term for appellant's conviction on count I after expressly concluding that the circumstances in aggravation and mitigation "appear to more or less equalize each other." (Pen. Code, § 1170, subd. (b).) However, *660 the court thereafter inadvertently declared four years, rather than two years to represent said midterm.[4]
The judgment is modified to reduce appellant's sentence from four to two years and upon issuance of our remittitur the superior court will correct its abstract of judgment accordingly. As so modified, the judgment is affirmed.
Files, P.J., and Kingsley, J., concurred.
Appellant's petition for a hearing by the Supreme Court was denied June 17, 1981.
NOTES
[1]  At the time of appellant's offense, the applicable statute was Health and Safety Code section 11378. Subsequently, section 11378.5 was enacted which specifically increased the penalty for possessing phencyclidine for sale.
[2]  At the hearing on appellant's motion to suppress, the parties stipulated the trial court might receive and consider the preliminary hearing transcript.
[3]  During their initial entry of the bedroom, where appellant was lying on the bed, the officers had retrieved a shotgun leaning against a wall.
[4]  Although the potential penalties for violating subdivision (b) of Health and Safety Code section 11383 had been increased from sixteen months, two years or three years to three, four or five years, effective January 1, 1979, the court was aware prior to the entry of appellant's "plea" that the lesser terms of imprisonment were in force at the time the instant offense was committed, commenting that appellant "gets in under the wire."
