The city remained a part of Baltimore County until 1851 when it was made an independent city .
The city was a part of Baltimore County until 1851 .