
528 So.2d 752 (1988)
STATE of Louisiana
v.
William HOLLEY.
No. KA 87 1557.
Court of Appeal of Louisiana, First Circuit.
June 21, 1988.
Rehearing Denied August 5, 1988.
*753 Bryan Bush, Dist. Atty., Office of the District Attorney, Baton Rouge by Steven Pugh, Asst. Dist. Atty., for plaintiff/appellee.
Kevin Patrick Monahan, Baton Rouge, for defendant/appellant.
Before LOTTINGER, EDWARDS and ALFORD, JJ.
ALFORD, Judge.
Defendant, William Carl Holley, was charged by bill of information with the offenses of possession with intent to distribute marijuana and possession with intent to distribute cocaine, violations of La. R.S. 40:966(A) and 967(A), respectively. The bill of information was subsequently amended to include two counts of attempted first degree murder in violation of La.R. S. 14:30 and 27. Defendant was rearraigned, tried by a jury, and convicted as charged of possession with intent to distribute marijuana and cocaine. He was convicted of attempted manslaughter and attempted second degree murder on the charges of attempted first degree murder. The trial court sentenced defendant to concurrent sentences of ten years at hard labor for each of the narcotics convictions, ten and one-half years at hard labor for the attempted manslaughter conviction, and fifty years at hard labor for the attempted second degree murder conviction. All the sentences imposed are to be served concurrently with one another and with any other sentence or sentences defendant may be serving.
Defendant has appealed his convictions of attempted manslaughter and attempted second degree murder. Additionally, he challenges the sentence imposed for the conviction of attempted second degree murder as excessive.

FACTS
The instant offenses were committed by defendant on December 18 and 19, 1986, while he was out on bond pending sentencing in case no. 9-86-467 [also decided this day; see our docket no. KA 87 1550, State v. Holley, 528 So.2d 757 (La.App. 1st Cir. 1988)]. On December 18, 1986, Detective Paula Honore and Detective Dana Smith were working in an undercover operation and in that capacity purchased $25.00 worth of marijuana from defendant in Room No. 245 of the Metz Motel on Airline Highway in Baton Rouge. On December 19, 1986, several undercover detectives went to the Metz Motel for the purpose of executing a search warrant issued for the search of the room occupied by defendant. The plan concocted by the detectives prior to execution of the search warrant provided that Detective Tullie Vincent was to drive Detectives Honore and Smith to the motel and drop them off near defendant's room. All officers were to be dressed "undercover" so as not to alert defendant of the imminent "drug bust" and thereby prevent destruction or disposal of the evidence. The two female detectives were to knock on the door and signal to Detective Vincent. Detective Vincent was then to radio to the backup units, Sergeant Dickinson and Detective Breland, to come in for backup and then to execute the search warrant.
The two female detectives got out of Detective Vincent's car and walked to the door of defendant's room. After they knocked on the door, Henry Gunn drew back the window curtains and peered out of the window at the two women. Defendant told Gunn to let the two women in because he recognized them as the two women to whom he had sold marijuana on the previous evening. Henry Gunn opened the door, and the two women exchanged greetings with defendant. Defendant appeared to be looking over the shoulders or the heads of the two women, through the open doorway, at something or someone outside of the room. Detective Honore turned around to look out of the door and saw that Detective Vincent was approaching the *754 room. Defendant suddenly drew a .25 caliber pistol from his trouser pocket. The two women yelled, "Gun!" and ran out of the room as Detective Vincent rushed into the doorway with his service revolver drawn. All three detectives identified themselves as police. Detectives Honore, Smith and Vincent, and Sergeant Dickinson testified that defendant appeared to be pointing the gun at each of them and that they all feared for their lives.
All four police officers testified that Detective Vincent attempted to use the doorway as a barricade and that all of the officers repeatedly yelled, "Police, drop the gun!" Detective Vincent repeatedly identified himself as a police officer and requested that defendant throw down his gun. Nonetheless, defendant fired a shot at Detective Vincent. Detective Vincent testified that defendant recognized him as a police officer and, after defendant recognized him as such, repeatedly stated, "Don't shoot me Tullie." Detective Vincent stated that he then threw Henry Gunn out of the motel room and that Sergeant Dickinson came into the room and threw Connie Sue Gunn out of the room. Defendant then dove between the double beds in the room, raised his arm over the bed, and fired a shot at Vincent and Sergeant Dickinson. Detective Vincent returned fire four times; and, simultaneously, Sergeant Dickinson fired twice. Detective Vincent stepped outside to reload, and Detective Breland entered the room. With Connie Sue Gunn out of the way, Sergeant Dickinson testified that he knew he could run around the bed and get behind defendant before he could turn around and fire another shot. Sergeant Dickinson was able to place his gun on defendant's back. He testified that he "hollered, police, again, and [defendant] threw the gun down and submitted to being arrested."
Subsequently, Officer Edward McCants of the Baton Rouge Police Department Crime Scene Division; Pat Lane, a forensic scientist and ballistics specialist; and Ben Odom, a homicide investigator, arrived at the scene for the purpose of gathering evidence. The three men testified that the .25 caliber weapon contained .25 caliber hollow-point bullets and that one of those slugs was embedded in the ceiling just between the doorway and the window. Another gun, a .22 caliber pistol, was recovered from underneath the mattress of the bed defendant had used as a barricade. The record reflects that defendant fired two .25 caliber slugs in the room.
Pat Lane, the ballistics specialist, testified that the .25 automatic pistol was prone to "jamming" and that anyone using the weapon would have to manually eject the empty casing and reload, or manually rotate the cylinder to the next chamber containing a live round. He stated the bullets used in the weapon were somewhat defective and that the weapon was more likely to "jam" as a result of the defective bullets. In Mr. Lane's opinion, the weapon had a fifty percent chance of firing and a fifty percent chance of "jamming" any time the trigger was pulled.
After he had been arrested and transported to the police station, defendant gave detectives a taped confession. The taped confession was ruled admissible at a hearing on a motion to suppress and was played for the jury. In defendant's taped confession, he stated that he was armed with weapons because he was expecting a purchaser of drugs to return and rob him of his narcotics and money. He stated that he was not aware that Detective Vincent was a police officer, that he did not see a badge, and that he was not told that the detectives were police officers. Nonetheless, defendant admitted that it took him some time to take the "gun off safety and shoot to scare them off." Defendant admitted that, when the detectives returned fire, he was aware that Detective Vincent was a police officer. Defendant claims that he did not intend to kill a police officer. Defendant admitted that he knew Detective Vincent as a police officer, but did not recognize him on the date of this incident.

ASSIGNMENT OF ERROR NUMBER ONE
In this assignment of error, defendant contends the evidence was insufficient to *755 support his convictions of attempted manslaughter and attempted second degree murder. Specifically, he claims that he lacked the requisite specific intent to kill.
We note that in order to challenge a conviction on the basis of insufficiency of the evidence, defendant should have proceeded by way of a motion for a post-verdict judgment of acquittal. See La. Code Crim. P. art. 821; State v. Britt, 510 So.2d 670 (La.App. 1st Cir.1987). Nevertheless, we will consider a claim of insufficiency of the evidence which has been briefed pursuant to a formal assignment of error.
The standard of review for the sufficiency of the evidence is whether, viewing the evidence in the light most favorable to the prosecution, a rational trier of fact could conclude that the state proved the essential elements of the crime beyond a reasonable doubt. See La. Code Crim.P. art. 821; State v. Captville, 448 So.2d 676 (La.1984).
Defendant was charged with the attempted first degree murder of Detective Tullie Vincent in count three and the attempted first degree murder of Sergeant Michael J. Dickinson in count four. The jury convicted defendant of the legislatively responsive verdict of attempted manslaughter as to count three and the responsive verdict of attempted second degree murder as to count four. See La.Code Crim.P. art. 814(A)(2).
When a defendant is charged with a greater offense but convicted of a lesser offense, and the elements of the lesser crime are included in the definition of the greater crime, evidence sufficient to convict of the greater crime is sufficient to convict of the lesser and included offense. See State v. Temple, 394 So.2d 259 (La. 1981). If the evidence at trial would have supported a finding of guilt of the greater offense, it is not necessary to determine whether the evidence adduced at trial was tailored to the lesser and included offense for which a defendant was originally charged. Id.
Defendant was charged with two counts of attempted first degree murder. La.R.S. 14:27 provides:
A. Any person who, having a specific intent to commit a crime, does or omits an act for the purpose of and tending directly toward the accomplishing of his object is guilty of an attempt to commit the offense intended; and it shall be immaterial whether, under the circumstances, he would have actually accomplished his purpose.
B. Mere preparation to commit a crime shall not be sufficient to constitute an attempt; but lying in wait with a dangerous weapon with the intent to commit a crime, or searching for the intended victim with a dangerous weapon with the intent to commit a crime, shall be sufficient to constitute an attempt to commit the offense intended.
C. An attempt is a separate but lesser grade of the intended crime; and any person may be convicted of an attempt to commit a crime, although it appears on the trial that the crime intended or attempted was actually perpetrated by such person in pursuance of such attempt.
. . . .
La.R.S. 14:30 provides in pertinent part:
A. First degree murder is the killing of a human being:
(2) When the offender has a specific intent to kill or to inflict great bodily harm upon a fireman or peace officer engaged in the performance of his lawful duties;
(3) When the offender has a specific intent to kill or to inflict great bodily harm upon more than one person;
. . . .
In order to convict defendant of attempted first degree murder, the state would have to prove that defendant had the specific intent to kill. The record reflected that defendant drew a gun which was concealed on his person in his trouser pocket, pointed the gun at Detectives Honore, Smith, Vincent and Sergeant Dickinson. Defendant fired two shots from that weapon from a distance of approximately ten feet. Detective Vincent and Sergeant Dickinson attempted to use the doorway as a barricade to shield themselves from defendant's *756 gunfire. A slug retrieved from the crime scene was embedded in the ceiling just above the doorway. All officers testified that they identified themselves as police officers and repeatedly told defendant to drop the gun, but that defendant nonetheless fired twice. This testimony was verified by physical evidence. Defendant in his confession admitted that he had armed himself, suspecting a "rip-off," and that when the officers herein arrived, defendant claimed that he thought that this was the "rip-off." Moreover, defendant acknowledged the fact that the officers screamed at him and told him to get out of the roomthat they were the police. Nonetheless, defendant claimed that he did not know the officers were "real" policemen and that he thought it was a game. Defendant stated it took him some time to shoot because he could not get the gun to operate. He had thought that the gun was cocked and ready to fire, but he was mistaken. The totality of the circumstances in the record presents evidence sufficient to convict defendant of the crimes of attempted first degree murder. See State v. Dillard, 320 So.2d 116 (La.1975); State v. Edge, 504 So.2d 1169 (La.App. 5th Cir.), writ denied, 507 So.2d 226 (La.1987); State v. Price, 498 So.2d 244 (La.App. 1st Cir. 1986), writ denied, 503 So.2d 474 (La.1987); State v. Buttner, 489 So.2d 970 (La.App. 4th Cir.), writs denied, 493 So.2d 634 (La. 1986); State v. Chairs, 466 So.2d 642 (La. App. 5th Cir.1985) and State v. Bessard, 461 So.2d 1201 (La.App. 3rd Cir.1984), writ denied, 466 So.2d 467 (La.1985).
The gravamen of the crime of attempted second degree murder is specific intent to kill and the commission of an overt act tending toward the accomplishment of that goal. La.R.S. 14:27 and 30.1; State v. Jarman, 445 So.2d 1184 (La.1984). Attempted manslaughter also requires the presence of specific intent to kill. See La.R.S. 14:27 and 31; see also State v. Hilburn, 512 So.2d 497 (La.App. 1st Cir.), writ denied, 515 So.2d 444 (La.1987). Due to the difficulty of presenting direct evidence as to the defendant's state of mind, the trier of fact may infer intent from the facts and circumstances of a transaction and the defendant's actions. La.R.S. 15:445. See State v. Kennedy, 494 So.2d 550 (La.App. 1st Cir.), writ denied, 495 So.2d 290 (La. 1986).
Defendant's contention that he lacked the specific intent to do anything but scare the persons rushing into the motel room as he perceived a "rip-off" is simply not supported by the record. After a careful review of the record, we believe that a rational trier of fact, viewing all of the evidence as favorably to the prosecution as any rational fact finder can, could have concluded that the state proved beyond a reasonable doubt that defendant was guilty of attempted first degree murder. See State v. Mussall, 523 So.2d 1305 (La.1988). The jurors were aware of the possibility that they could return responsive verdicts of guilty, guilty of attempted second degree murder, guilty of attempted manslaughter, guilty of aggravated battery, or not guilty. The jury is free to infer any mitigatory factors from the evidence presented at trial. State v. Lombard, 486 So.2d 106, 110 n. 9 (La.1986). The jury concluded that this was a case of attempted manslaughter and attempted second degree murder. We have carefully reviewed the evidence and find that the evidence supports the jury's determination.

ASSIGNMENT OF ERROR NUMBER TWO
In this assignment of error, defendant contends the fifty year sentence imposed for his conviction of attempted second degree murder is excessive.
Article I, § 20, of the Louisiana Constitution of 1974 prohibits the imposition of excessive punishment. A sentence within the statutory limits may nonetheless violate a defendant's constitutional right against excessive punishment and is subject to appellate review. State v. Sepulvado, 367 So.2d 762 (La.1979). Generally, a sentence is considered excessive if it is grossly disproportionate to the severity of the crime or is nothing more than the needless imposition of pain and suffering. Moreover, maximum sentences are appropriately *757 reserved for the most egregious or blameworthy of offenders. State v. Brown, 504 So.2d 1055, 1059 (La.App. 1st Cir.), writ denied, 506 So.2d 1223 (La.1987). A trial court is given wide discretion in the imposition of sentences within statutory limits and the sentence imposed by it should not be set aside as excessive in the absence of manifest abuse of that discretion. State v. Lanclos, 419 So.2d 475 (La. 1982).
The record does not support defendant's claim that the sentence is disproportionate to the offense or excessive. The trial judge stated that he had reviewed the presentence investigation report and noted for the record that a plea bargain had been accepted on another offense and that, pending sentencing for that offense, defendant "pulled this stunt on December 18 and 19 insofar as the most serious charges that you can commit." The trial court decided to incarcerate the defendant because there was an undue risk that defendant would commit another crime during any period of suspension of sentence or probation. The trial judge specifically noted the likelihood that defendant would commit another crime as exhibited by the fact that defendant, while out on bond on other charges, "committed this most serious crime of attempted first degree murder of a police officerattempted manslaughter for which he was convicted."
The presentence investigation report recommends the harshest sentence possible under the law. The report notes defendant's violent tendencies and additional drug-related charges, which reflect that defendant is continuing his criminal behavior and that he is not deterred from dealing in the drug culture. In addition to considering the presentence investigation report, the trial judge also considered the mitigating factors in defendant's case. Nonetheless, those factors were by far outweighed by the aggravating circumstances surrounding the commission of the instant offense. It is apparent from the record that the trial court considered that a lesser sentence would deprecate the seriousness of the offense.
We are unable to say that the trial court abused its sentencing discretion. A sentence of fifty years for the crime of attempted second degree murder is not excessive in consideration of defendant's violent tendencies toward police officers and the seriousness of the offenses committed. Accordingly, the conviction and sentence are affirmed.
AFFIRMED.
