In this paper we establish an SIR model with a standard incidence rate and a nonlinear recovery rate, formulated to consider the impact of available resources of the public health system especially the number of hospital beds. The main assumption of this model is that the population comprises three subgroups: the healthy individuals who are susceptible (S) to infection, the already infected individuals (I ) who can transmit the disease to the healthy ones, and the individuals who are recovered (R) from the infection cycle. One of the major undertakings of epidemiological modeling is to describe how changes in biological processes will effect the characteristics of the infection dynamics at a population level. R 0, the basic reproductive ratio, represents the expected number of new infections caused by each case of infection at the start of an epidemic in a certain baseline population. If R 0 1, the number of infections after an initial introduction grows, creating an epidemic. If R 0 1, small initial introductions are not sufficiently transmissible to cause an epidemic; a new epidemic cannot be started and an endemic disease will fade out. Thus, many control policies have focused on reaching coverage levels sufficient to reduce R 0 below 1. Over the last 15 years, one of the important issues in epidemiological modeling has been understanding when and how the R 0 can fail. In particular, some epidemic models can be bistable: R 0 1 is a sufficient condition for avoiding an epidemic caused by the introduction of a small number of initial cases, but R 0 1 is not a sufficient condition for eradication of the disease once it is endemic. One common way to identify bistable epidemic models is to look for backward bifurcations. In SIR models, the trans critical bifurcation at R 0 1 typically has two locally stable branches: a disease-free branch that is locally stable for R0 1, and an endemic disease branch that is stable for R0 1. As the basic reproductive ratio is varied through the bifurcation, the asymptotic dynamics of the system under small perturbations change continuously between these two branches. This is called a forward bifurcation. A model has a backward bifurcation if only one of the three biologically feasible branches of the trans critical bifurcation in the neighborhood of R0 1 is locally stable. Because remaining two biologically feasible branches (corresponding to non-negative population states) are locally unstable, variations in the basic reproductive ratio lead to discontinuous changes in the asymptotic dynamics of the system. A small increase in the transmission rate causes a large increase in the number of disease cases. A subsequent small decrease in the transmission rate does not lead to the sudden disappearance of an endemic disease. The R0 can potentially lead to serious miscalculations when a model exhibits a backward bifurcation or other forms of bistability, so it is important to understand the circumstances that can create a backward bifurcation. For the three dimensional model with total population regulated by both demographics and diseases incidence, we prove that the model can undergo backward bifurcation, saddle-node bifurcation, Hopf bifurcation and Bogdanov–Takens bifurcation of codimension 2 and 3. The bifurcation diagram of system with Bogdanov–Takens bifurcation of codimension 2 includes three bifurcation curves at which fold, Andronov–Hopf, and saddle-homoclinic bifurcations occur. Bogdanov–Takens bifurcation of codimension 3 is called a degenerate Bogdanov-Takens bifurcation with a double equilibrium or cusp of codim 3. Its bifurcation diagram in the three-dimensional space includes a bifurcation curve of homoclinic orbits to a neutral saddle and a curve of Bautin (degenerate Andronov–Hopf) bifurcations. We present the bifurcation diagram near the cusp type of Bogdanov–Takens bifurcation point of codimension 3 and give epidemiological interpretation of the complex dynamical behaviors of endemic due to the variation of the number of hospital beds. This study suggests that maintaining enough number of hospital beds is crucial for the control of the infectious diseases.