
350 So.2d 451 (1977)
Judson LOCKE, as Commissioner of the Board of Corrections of the State of Alabama
v.
William J. WHEAT, in his Capacity as Sheriff of Washington County, Alabama.
SC 2447.
Supreme Court of Alabama.
September 30, 1977.
*452 W. Scears Barnes of Radney, Radney & Barnes, Alexander City, for appellant.
Edward P. Turner, Jr., and Marc E. Bradley, Chatom, for appellee.
TORBERT, Chief Justice.
This case is an appeal from an order granting an injunction restraining a transfer of state prisoners from Mobile County jail to Washington County jail. This transfer was ordered by appellant Judson C. Locke, Commissioner of the Board of Corrections, pursuant to Title 45, sections 166 and 167, Code of Alabama 1940 (Recomp.1958).
On October 21, 1976 Mobile County jail was inspected by the Board of Corrections. A written report was filed with the Mobile County Commission which stated that overcrowded conditions existed in the Mobile County jail and were creating security problems. This report did not contain a demand by Commissioner Locke that the Mobile County Commission correct the overcrowded conditions within a specified time.
As of February 1, 1977, Mobile County jail had an inmate population of 352 persons, which is 70 persons over the facility's design capacity of 282. On that same day, Washington County jail had 23 inmates in a facility designed for 67 persons.
Commissioner Locke informed Mobile County and Washington County on February 3, 1977, that a transfer of 15 state prisoners would be made from Mobile County jail to Washington County jail. He then selected 15 "low risk" prisoners, whose sentences ranged from 1 year and a day to 8 years, to be transferred.
Washington County Sheriff William J. Wheat, appellee, petitioned the Washington County Circuit Court for a temporary restraining order enjoining this transfer which was granted February 7, 1977.
An evidentiary hearing was held on February 15, 1977. Sheriff Wheat testified that security problems would develop if the state prisoners were transferred to the Washington County jail and that he would need another jailer to properly house and secure the additional inmates. The probate judge of Washington County testified that the county had no extra funds with which to hire an additional jailer.
The trial court issued a preliminary injunction enjoining the proposed transfer February 23, 1977, stating that Commissioner Locke had failed to comply with the provisions of Title 45, section 166 and therefore could be restrained from transferring state prisoners under section 167.
Title 45, section 166 provides:
"§ 166. (4860) Alterations, etc., to be made.Whenever the department shall make written report to the court of county commissioners, or board of revenue, or to the city council, or other governing board or body, that certain conditions in the jail, prison, or almshouse should be remedied, or that certain improvements, additions or alterations should be made, they shall have the matter attended to within such reasonable time as may be designated by the department, and shall make written report to the department that such orders have been carried out."
Title 45, section 167 provides in pertinent part:

*453 "§ 167. (4861) (7219) Removal of prisoners.In the event such instructions prescribed in the foregoing section are not carried out, and in the event the unsanitary or insecure conditions or overcrowding of prisoners, in the opinion of the department, warrant it, . . . the department may order any or all persons confined in such jail, . . . immediately transferred to the jail, . . . of some other county, to be designated."
The authority of Commissioner Locke to order transfers of prisoners from one county jail to another is undisputed by the parties on this appeal. We agree with the trial court, Commissioner Locke, and Sheriff Wheat that the language of section 167 clearly provides Commissioner Locke with the power to order a transfer when the Board of Corrections deems it necessary within the statutory guidelines.
The issue presented for review is whether or not Commissioner Locke may order a transfer under section 167 without first complying with the procedure set out in section 166. In other words, this court must decide whether the trial court erred in granting an injunction because Commissioner Locke failed to demand in writing that Mobile County correct the overcrowded conditions within a reasonable time before ordering the transfer to Washington County jail. As the Code sections at issue have not previously been construed by this court, our decision in this case must be made by reference to well-established rules of statutory construction.
This court has often stated that the fundamental rule of statutory construction is to ascertain and give effect to the legislature's intent as expressed in the statute. League of Women Voters v. Renfro, 292 Ala. 128, 290 So.2d 167 (1974); City of Montgomery v. Montgomery City Lines, 254 Ala. 652,49 So.2d 199 (1950); Street v. Cloe, 207 Ala. 631, 93 So. 591 (1922).
Sections of the Code dealing with the same subject matter are in pari materia. Kelly v. State, 273 Ala. 240, 139 So.2d 326 (1962). As a general rule, such statutes should be construed together to ascertain the meaning and intent of each. League of Women Voters v. Renfro, 292 Ala. 128, 290 So.2d 167 (1974); Union Central Life Ins. Co. v. State, 226 Ala. 420, 147 So. 187 (1933); City of Birmingham v. Southern Express Co., 164 Ala. 529, 51 So. 159 (1909).
Applying these rules of construction to the statutes at issue in the present case, we conclude that Commissioner Locke must first comply with the provisions of section 166 by ordering in writing that Mobile County correct the conditions in its jail before he orders a transfer under the authority given him by section 167. We believe the intent of the legislature that the provisions of section 166 must be carried out before section 167 may be activated is clearly indicated by the first sentence of section 167, which sentence specifically refers to the provisions of section 166. Furthermore, these two Code sections are clearly in pari materia as they were both enacted by the same legislature and they both relate to the subject of the prisons. Therefore, section 166 should be construed together with section 167.
Although these statutes were passed many years ago and the legislature at that time could not have known of the current problem of overcrowding in the county jails due to the housing of state prisoners, we are still bound by the rules of statutory construction.
We find no error in the decision of the trial court.
AFFIRMED.
BLOODWORTH, FAULKNER, JONES, ALMON, SHORES, EMBRY and BEATTY, JJ., concur.
MADDOX, J., dissents.
MADDOX, Justice (dissenting).
If we were dealing with an ordinary situation, I would agree with the majority's mechanical and technical interpretation of Sections 166 and 167 of Title 45. As we all know, however, we are not dealing with the ordinary situation. The majority requires the Commissioner to proceed under Section *454 166, when the only testimony before the trial judge shows that such would be "impractical."[1]
Commissioner Locke and the Board of Corrections are under federal court order. This order, issued in August of 1975, by United States District Judge Frank M. Johnson, Jr., enjoined the Board of Corrections for the State of Alabama from accepting any additional state prisoners into state operated prison facilities from county jail facilities statewide with the exception of escapees and parole violators until inmate population of the state facilities was reduced below design capacity.
Following the federal court injunction of August, 1975, county jail facilities statewide began experiencing problems of overcrowding. Reduction of inmate population in state facilities below design capacity was accomplished in September, 1976, and in an attempt to relieve the congestion in county facilities, the federal court was asked to allow Commissioner Locke to receive state prisoners into state facilities on a space available discretionary basis. The petition was granted and induction of state inmates fitting a "minimum" category was initiated. Again, in December, 1976, Locke petitioned the federal court requesting induction of prisoners from county jails who fit a maximum custody classification but again on a space available discretionary basis. The petition was granted.
To further alleviate overcrowding in county jail facilities, Locke arranged voluntary transfers between consenting counties; however, may counties indicated they would not accept state prisoners on a voluntary basis. Overcrowding was still a problem in many county jails on the date of trial.
Locke was advised by the federal court that he was to implement transfers through Section 167, Title 45, Code of Alabama, 1940, to reduce overcrowding.[2]
*455 Both sides admit that Judge Johnson, when asked to abstain from ruling in the Houston County case (Adams v. Mathis, Ala., 350 So.2d 381) until this Court could rule on McKinney et al. v. Locke, 346 So.2d 419 (1977) or until this Court could rule on this appeal, denied the motion stating:
". . . The authority and duties of the Board of Corrections and the Commissioner, who is the chief administrative officer of the Board (Section 10(5)), with regard to county jails are contained in Title 45 of the Code of Alabama. It is the responsibility of the Board to inspect *456 the jail twice a year (Section 160), to see that sanitary buildings are constructed and maintained in a sanitary condition (Section 160), and, if necessary, to order that the condition of the buildings and grounds be corrected (Section 161). The Board has the authority to condemn the jail if conditions warrant such action, (Section 162), or it may order that prisoners be transferred to other jails to relieve overcrowding, insecure, or unsanitary conditions (Section 167). The duties of the Board are both clear and mandatory. The Board `shall' do these things set out in Section 160. The other sections within this part of the Code give the Board the means of enforcing its orders. And since the language of these sections is clear, abstention would not be proper. Kusper v. Pontikes, supra; Southwest Airlines Co. v. Texas International Airlines, 546 F.2d 84 (5th Cir. 1977).
"However, the movants go further and argue that the Court should abstain until completion of the pending state judicial proceedings in which the same issues are presented. The pendency of these cases is not determinative. As the Fifth Circuit has noted, `The policies furthered by abstention cannot be circumvented merely by the plaintiff's selecting a federal forum to the exclusion of the state forum.' Romero v. Coldwell, 455 F.2d 1163 (5th Cir. 1972). The apparent basis for the movants' arguing that the responsibilities and duties of the board and the Commissioner are not clear in spite of the clear language of the statutes is the existence of several Attorney General Opinions. But, `while these opinions may be helpful and even persuasive to a court, they are advisory only and do not carry the force of a judicial decision.' Romero, supra, at 1164; accord, Associates [Associated] Industries of Alabama, Inc. v. State, 55 Ala.App. 277, [314 So.2d 879], cert. denied, 294 Ala. 281, 314 So.2d 901 (1975)."
It appears to me that the federal court, even though aware of the pendency of this appeal, has already interpreted state law to place an affirmative duty on the Board of Corrections and the Commissioner, under penalty of possible contempt, to order prisoners transferred under Title 45, Sections 160, et seq. Now this Court has enjoined him from proceeding in a manner the federal court has said must be used.
Instead of equitably solving the serious federal-state conflict, it appears this Court has let pass an opportunity not to place the Commissioner in such a difficult spot.
It seems to me that, on balance, that this Court should recognize that under the facts and circumstances as they presently exist, that the Commissioner should not be required to proceed under Section 166 when he knows that it is "impractical." In other words, this was an equitable action. The trial court fashioned what I consider an extraordinary, harsh remedyan injunctionto remedy the situation. It appears to me that the issuance of an injunction here was inequitable. I realize that equity follows the law, but in this case, there is still open the question of whose lawthat announced by the federal court or that announced by the legislature several years ago when the problems we now face could not have been foreseen. The interpretation of the Commissioner's responsibility under state law, as I have already said, is not illogical, except for the facts of this case. We all know, however, that requirements of state law cannot run afoul of the federal constitution. The prison order issued by the district court, unless overturned, (the state has asked for a rehearing en banc in the Fifth Circuit Court of Appeals) will control.
I believe the majority has unnecessarily created a federal-state conflict which could have easily been avoided by directing the trial court to fashion his remedy in such a way that the sound objections[3] raised by *457 the sheriff of Washington County, could have been alleviated. In other words, an injunction could have been fashioned which could have required the state to do equity, too.
As I said initially, this is an unusual case. I think the remedy fashioned by the trial court was much too harsh in view of all the facts and circumstances. Consequently, I respectfully dissent.
NOTES
[1]  Locke was questioned by Sheriff Wheat's attorney and he testified, as follows:

"Q In connection with specifically with reference to Title 45, Section 166, have you, as Director of the Board of Corrections, or has the Board of Corrections to your knowledge made any written report to the Mobile Commissioners, the name of it now, I believe, is Mobile County Commission, asking the Mobile County Commission to remedy any conditions in the Mobile County jail to make any improvements or any additions or alterations to the Mobile County jail?
"A We make a report twice a year, which goes to the sheriff and to the county commission. This report would point out some of these discrepancies.
* * * * * *
"Q Are these inspections and reports of the Mobile County Commission made by the Board of Corrections pursuant to Title 45, Section 166?
"A The report, the only report that we have given, is a report required to be made, an inspection report that's made twice a year. These do go to the sheriff and to the County Commission, pointing out overcrowdedness, condition of the jail, and these sorts of things.
"Q All right, do these reports ask that these conditions be remedied, or alterations or additions, or improvements be made to the Mobile County jail within any period of time after the report is received by the Commission?
"A Well, they are made to the County Commission and the discrepancies are pointed out. I didn't file any report per se according to 166. The reason I didn't do this is because in my opinion it is impractical. We do have a report made twice a year that goes to the commission, and the reason I didn't file this report is because it is impractical. The major difficulty in Mobile County is overcrowdedness. I think it would be impractical to order a new facility to be built to accommodate overcrowdedness of a temporary nature. This is a state problem to house state prisoners. I think the building should be done at the state level. This is a function of the legislature and the executive branch to provide facilities for housing of state prisoners. Additionally, I don't think it would be practical to order a county commission to build a facility, or expand it or renovate it, and the only enforcement is that it has to go through the governor. They have an appeal from any order from this office directly to the governor. I can order them to build another facility, et cetera, but they can appeal to the governor. I think it's unenforceable." (emphasis added).
[2]  Commissioner Locke testified:

"Q All right, sir, now then, has the Board of Corrections made any independent determination as the Board of Corrections that because of failure of Mobile County Commission to make improvements, additions, or alterations that it has created an overcrowded condition or unsanitary condition or an insecure condition in the Mobile County jail?
"A No sir, I maintain that the overcrowdedness is due to a Federal Court order back in August of '75 that prohibited the State Board of Corrections from receiving prisoners.
"Q All right, then, if I understand your testimony correctly, the overcrowded condition that exists in the Mobile County jail is caused by a Federal Court order and not by a failure of the Mobile County Commission to make alterations, improvements or additions to the Mobile County jail?
"A This is my opinion.
"Q Now, the Federal Court order in effect does what, Mr. Locke?
"A Well, it initially prohibited the Board of Corrections from bringing in any prisoners other than escapees, females, and parole violators, and youthful offenders that were to be assigned to the Youth Center, Frank Lee Youth Center. We were prohibited from bringing in any prisoners until the population of the four major institutions came under the designed capacity.
"Q Is the effect of that order that prisoners or individuals who are convicted of state crimes remain in the local county jails until they can be processed into the state system?
"A That is correct.
"Q And you can't process them into the state system because of the Federal Court order at this time?
"A Well, we came under design capacity around October or November of '76. At that time we petitioned the court to allow us to start bringing in prisoners according to bed space available, and on a selective basis, and we were allowed to do this in December. Initially we requested to bring in the minimum security type prisoner because during the year we had furnished some nine hundred additional bed space primarily in the minimum security type facility because we had Federal money that allowed us to build trailers and this sort of thing, work relief, et cetera, and later on that same month, in fact it was December 21st of last year, we petitioned the court to allow us to bring in the maximum security type, again on a selective basis according to bed space available, and we have brought in some four hundred and fifty prisoners since December of last year exclusive of parole violators and escapees.
"Q And if I've asked this before, I apologize, it is my understanding from what you've testified to that the primary reason for the overcrowded condition that exists in the Mobile County jail at this time is because of the Federal Court order preventing you from bringing state prisoners out of the local Mobile County jail into the state system, is that correct?
"A Yes, sir. That's correct.
"MR. TURNER: That's all.
"CROSS-EXAMINATION BY MR. RADNEY:
"Q Mr. Locke, are you now under a contempt citation from any court?
"A Yes, sir.
"Q What court is that?
"A This is the Middle District Court, Judge Johnson's court.
"Q What was the nature of this contempt order?
"A I was ordered to keep the population of the Houston County jail beneath the designed capacity by the Federal Court.
"Q Was this by use of Section 167 of Title 45?
"A Yes, sir, I was instructed to implement the sections in the statute 167 through 185. Initially, we applied to the Federal Court that we preferred to do this on a voluntary basis because the statute was vague and unenforceable in our opinion, and the Federal Court ruled that this was an erroneous interpretation; to go ahead that I had the authority and the obligation under those sections to transfer prisoners from crowded jails to jails that had the vacancies throughout the state.
"Q Pursuant to the Federal Court citation which you are now working under, and pursuant to a resolution of the Board of Corrections, you are now acting to follow through a transfer of prisoners, are you not?
"A That's correct. Due to the order of the Court, and the judge's statement that I had the responsibility under this statute, and the authority and obligation, and then I had a resolution from my board for whom I work, the Board of Corrections, a five member board, and also advice of legal counsel to go ahead and initiate, carry through with the transfer of prisoners, which we've done.
"Q And three counties have filed injunctions?
"A We initiated the transfer among seven counties, and three filed a restraining order."
[3]  "Sheriff Wheat testified that the influx of an additional fifteen (15) state prisoners would present problems mainly in two areas, i. e. (a) bed space and (b) security.

"He also testified he would need an extra jailer in addition to the three (3) already employed to properly house and secure fifteen (15) additional prisoners . . . ."
