Montgomery County of the U.S. state of Maryland is located north of Washington , D.C. and southwest of Baltimore . Montgomery County is a county in the U.S. state of Maryland situated just north of Washington , D.C. , and southwest of Baltimore .