<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.20.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>684</ContextCount>
  <ElementCount>708</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>118</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>13</UnitCount>
  <MyReports>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000010001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010002 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100020003 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100030004 - Statement - Consolidated Statements of Income and Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedStatementsofIncomeandComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100040005 - Statement - Consolidated Statements of Income and Comprehensive Income (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedStatementsofIncomeandComprehensiveIncomeParenthetical</Role>
      <ShortName>Consolidated Statements of Income and Comprehensive Income (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100050006 - Statement - Consolidated Statements of Changes in Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedStatementsofChangesinShareholdersEquity</Role>
      <ShortName>Consolidated Statements of Changes in Shareholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>100060007 - Statement - Consolidated Statements of Changes in Shareholders' Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedStatementsofChangesinShareholdersEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Shareholders' Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>100070008 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>210011001 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>210041002 - Disclosure - Cash and Cash Equivalents</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CashandCashEquivalents</Role>
      <ShortName>Cash and Cash Equivalents</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>210061003 - Disclosure - Investment Securities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecurities</Role>
      <ShortName>Investment Securities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>210141004 - Disclosure - Mortgage Servicing Rights</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/MortgageServicingRights</Role>
      <ShortName>Mortgage Servicing Rights</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>210171005 - Disclosure - Loans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/Loans</Role>
      <ShortName>Loans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>210301006 - Disclosure - Allowance for Loan Losses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLosses</Role>
      <ShortName>Allowance for Loan Losses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>210371007 - Disclosure - Premises and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/PremisesandEquipment</Role>
      <ShortName>Premises and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>210421008 - Disclosure - Other Real Estate Owned</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherRealEstateOwned</Role>
      <ShortName>Other Real Estate Owned</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>210451009 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>210481010 - Disclosure - Certificates of Deposit</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CertificatesofDeposit</Role>
      <ShortName>Certificates of Deposit</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>210511011 - Disclosure - Borrowed Funds</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/BorrowedFunds</Role>
      <ShortName>Borrowed Funds</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>210541012 - Disclosure - Employee Benefit Plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EmployeeBenefitPlans</Role>
      <ShortName>Employee Benefit Plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>210591013 - Disclosure - Other Comprehensive Income (Loss)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherComprehensiveIncomeLoss</Role>
      <ShortName>Other Comprehensive Income (Loss)</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>210651014 - Disclosure - Financial Derivative Instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FinancialDerivativeInstruments</Role>
      <ShortName>Financial Derivative Instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>210681015 - Disclosure - Common Stock</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CommonStock</Role>
      <ShortName>Common Stock</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>210701016 - Disclosure - Stock Options and Stock-Based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/StockOptionsandStockBasedCompensation</Role>
      <ShortName>Stock Options and Stock-Based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>210741017 - Disclosure - Earnings Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EarningsPerShare</Role>
      <ShortName>Earnings Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>210771018 - Disclosure - Regulatory Capital Requirements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/RegulatoryCapitalRequirements</Role>
      <ShortName>Regulatory Capital Requirements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>210801019 - Disclosure - Off-Balance-Sheet Financial Instruments and Concentrations of Credit Risk</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OffBalanceSheetFinancialInstrumentsandConcentrationsofCreditRisk</Role>
      <ShortName>Off-Balance-Sheet Financial Instruments and Concentrations of Credit Risk</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>210831020 - Disclosure - Fair Value Disclosures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FairValueDisclosures</Role>
      <ShortName>Fair Value Disclosures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>210871021 - Disclosure - Other Operating Income and Expense</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherOperatingIncomeandExpense</Role>
      <ShortName>Other Operating Income and Expense</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>210901022 - Disclosure - Legal Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LegalContingencies</Role>
      <ShortName>Legal Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>210911023 - Disclosure - Reclassifications</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/Reclassifications</Role>
      <ShortName>Reclassifications</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>210921024 - Disclosure - Condensed Financial Information of Parent</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CondensedFinancialInformationofParent</Role>
      <ShortName>Condensed Financial Information of Parent</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>210951025 - Disclosure - New Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/NewAccountingPronouncements</Role>
      <ShortName>New Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>210961026 - Disclosure - Quarterly Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/QuarterlyInformation</Role>
      <ShortName>Quarterly Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>210991027 - Disclosure - Acquisitions and Intangible Assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AcquisitionsandIntangibleAssets</Role>
      <ShortName>Acquisitions and Intangible Assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>220022001 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>230073001 - Disclosure - Investment Securities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesTables</Role>
      <ShortName>Investment Securities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/InvestmentSecurities</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>230153002 - Disclosure - Mortgage Servicing Rights (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/MortgageServicingRightsTables</Role>
      <ShortName>Mortgage Servicing Rights (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/MortgageServicingRights</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>230183003 - Disclosure - Loans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansTables</Role>
      <ShortName>Loans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/Loans</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>230313004 - Disclosure - Allowance for Loan Losses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLossesTables</Role>
      <ShortName>Allowance for Loan Losses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/AllowanceforLoanLosses</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>230383005 - Disclosure - Premises and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/PremisesandEquipmentTables</Role>
      <ShortName>Premises and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/PremisesandEquipment</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>230433006 - Disclosure - Other Real Estate Owned (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherRealEstateOwnedTables</Role>
      <ShortName>Other Real Estate Owned (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherRealEstateOwned</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>230463007 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/IncomeTaxes</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>230493008 - Disclosure - Certificates of Deposit (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CertificatesofDepositTables</Role>
      <ShortName>Certificates of Deposit (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/CertificatesofDeposit</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>230523009 - Disclosure - Borrowed Funds (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/BorrowedFundsTables</Role>
      <ShortName>Borrowed Funds (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/BorrowedFunds</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>230553010 - Disclosure - Employee Benefit Plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EmployeeBenefitPlansTables</Role>
      <ShortName>Employee Benefit Plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/EmployeeBenefitPlans</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>230603011 - Disclosure - Other Comprehensive Income (Loss) (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherComprehensiveIncomeLossTables</Role>
      <ShortName>Other Comprehensive Income (Loss) (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherComprehensiveIncomeLoss</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>230663012 - Disclosure - Financial Derivative Instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FinancialDerivativeInstrumentsTables</Role>
      <ShortName>Financial Derivative Instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/FinancialDerivativeInstruments</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>230713013 - Disclosure - Stock Options and Stock-Based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/StockOptionsandStockBasedCompensationTables</Role>
      <ShortName>Stock Options and Stock-Based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/StockOptionsandStockBasedCompensation</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>230753014 - Disclosure - Earnings Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EarningsPerShareTables</Role>
      <ShortName>Earnings Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/EarningsPerShare</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>230783015 - Disclosure - Regulatory Capital Requirements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/RegulatoryCapitalRequirementsTables</Role>
      <ShortName>Regulatory Capital Requirements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/RegulatoryCapitalRequirements</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>230813016 - Disclosure - Off-Balance-Sheet Financial Instruments and Concentrations of Credit Risk (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OffBalanceSheetFinancialInstrumentsandConcentrationsofCreditRiskTables</Role>
      <ShortName>Off-Balance-Sheet Financial Instruments and Concentrations of Credit Risk (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OffBalanceSheetFinancialInstrumentsandConcentrationsofCreditRisk</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>230843017 - Disclosure - Fair Value Disclosures (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FairValueDisclosuresTables</Role>
      <ShortName>Fair Value Disclosures (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/FairValueDisclosures</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>230883018 - Disclosure - Other Operating Income and Expense (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherOperatingIncomeandExpenseTables</Role>
      <ShortName>Other Operating Income and Expense (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherOperatingIncomeandExpense</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>230933019 - Disclosure - Condensed Financial Information of Parent (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CondensedFinancialInformationofParentTables</Role>
      <ShortName>Condensed Financial Information of Parent (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/CondensedFinancialInformationofParent</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>230973020 - Disclosure - Quarterly Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/QuarterlyInformationTables</Role>
      <ShortName>Quarterly Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/QuarterlyInformation</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>231003021 - Disclosure - Acquisitions and Intangible Assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AcquisitionsandIntangibleAssetsTables</Role>
      <ShortName>Acquisitions and Intangible Assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/AcquisitionsandIntangibleAssets</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>240034001 - Disclosure - Summary of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/SummaryofSignificantAccountingPoliciesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/SummaryofSignificantAccountingPoliciesPolicies</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>240054002 - Disclosure - Cash and Cash Equivalents (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CashandCashEquivalentsDetails</Role>
      <ShortName>Cash and Cash Equivalents (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/CashandCashEquivalents</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>240084003 - Disclosure - Investment Securities - Summary of Amortized Cost and Estimated Fair Value, AFS (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesSummaryofAmortizedCostandEstimatedFairValueAFSDetails</Role>
      <ShortName>Investment Securities - Summary of Amortized Cost and Estimated Fair Value, AFS (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>240094004 - Disclosure - Investment Securities - Summary of Amortized Cost and Estimated Fair Value, HTM and Restricted Equity Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesSummaryofAmortizedCostandEstimatedFairValueHTMandRestrictedEquitySecuritiesDetails</Role>
      <ShortName>Investment Securities - Summary of Amortized Cost and Estimated Fair Value, HTM and Restricted Equity Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>240104005 - Disclosure - Investment Securities - Summary of Contractual Maturities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesSummaryofContractualMaturitiesDetails</Role>
      <ShortName>Investment Securities - Summary of Contractual Maturities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>62</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>240114006 - Disclosure - Investment Securities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesNarrativeDetails</Role>
      <ShortName>Investment Securities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>63</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>240124007 - Disclosure - Investment Securities - Securities Gains and Losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesSecuritiesGainsandLossesDetails</Role>
      <ShortName>Investment Securities - Securities Gains and Losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>240134008 - Disclosure - Investment Securities - Securities Temporarily Impaired (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/InvestmentSecuritiesSecuritiesTemporarilyImpairedDetails</Role>
      <ShortName>Investment Securities - Securities Temporarily Impaired (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>240164009 - Disclosure - Mortgage Servicing Rights (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/MortgageServicingRightsDetails</Role>
      <ShortName>Mortgage Servicing Rights (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/MortgageServicingRightsTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>240194010 - Disclosure - Loans - Portfolio (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansPortfolioDetails</Role>
      <ShortName>Loans - Portfolio (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>240204011 - Disclosure - Loans - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansNarrativeDetails</Role>
      <ShortName>Loans - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>240214012 - Disclosure - Loans - Summary of Loans to Directors and Executive Officers (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansSummaryofLoanstoDirectorsandExecutiveOfficersDetails</Role>
      <ShortName>Loans - Summary of Loans to Directors and Executive Officers (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>240224013 - Disclosure - Loans - Modification Statuses by Portfolio Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansModificationStatusesbyPortfolioSegmentDetails</Role>
      <ShortName>Loans - Modification Statuses by Portfolio Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>240234014 - Disclosure - Loans - Past-due Status of Loans by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansPastdueStatusofLoansbyClassDetails</Role>
      <ShortName>Loans - Past-due Status of Loans by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>240244015 - Disclosure - Loans - Nonaccrual Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansNonaccrualLoansDetails</Role>
      <ShortName>Loans - Nonaccrual Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>240254016 - Disclosure - Loans - Information Regarding Impaired Loans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansInformationRegardingImpairedLoansDetails</Role>
      <ShortName>Loans - Information Regarding Impaired Loans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>240264017 - Disclosure - Loans - Impaired Loans by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansImpairedLoansbyClassDetails</Role>
      <ShortName>Loans - Impaired Loans by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>240274018 - Disclosure - Loans - TDRs by Class and Specific Reserve (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansTDRsbyClassandSpecificReserveDetails</Role>
      <ShortName>Loans - TDRs by Class and Specific Reserve (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>240284019 - Disclosure - Loans - TDRs by Class and Associated Specific Reserves (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansTDRsbyClassandAssociatedSpecificReservesDetails</Role>
      <ShortName>Loans - TDRs by Class and Associated Specific Reserves (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>240294020 - Disclosure - Loans - Pre-Modification and Post-Modification Outstanding Recorded Investment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/LoansPreModificationandPostModificationOutstandingRecordedInvestmentDetails</Role>
      <ShortName>Loans - Pre-Modification and Post-Modification Outstanding Recorded Investment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>240324021 - Disclosure - Allowance for Loan Losses - Composition of Allowance for Loans Losses, by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLossesCompositionofAllowanceforLoansLossesbyClassDetails</Role>
      <ShortName>Allowance for Loan Losses - Composition of Allowance for Loans Losses, by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>240334022 - Disclosure - Allowance for Loan Losses - Financing Receivable and Allowance Element by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLossesFinancingReceivableandAllowanceElementbyClassDetails</Role>
      <ShortName>Allowance for Loan Losses - Financing Receivable and Allowance Element by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>240344023 - Disclosure - Allowance for Loan Losses - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLossesNarrativeDetails</Role>
      <ShortName>Allowance for Loan Losses - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>240354024 - Disclosure - Allowance for Loan Losses - Risk Ratings by Segment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLossesRiskRatingsbySegmentDetails</Role>
      <ShortName>Allowance for Loan Losses - Risk Ratings by Segment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>240364025 - Disclosure - Allowance for Loan Losses - Activity by Class (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AllowanceforLoanLossesActivitybyClassDetails</Role>
      <ShortName>Allowance for Loan Losses - Activity by Class (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>240394026 - Disclosure - Premises and Equipment - Schedule of Premises and Equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/PremisesandEquipmentScheduleofPremisesandEquipmentDetails</Role>
      <ShortName>Premises and Equipment - Schedule of Premises and Equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>240404027 - Disclosure - Premises and Equipment - Anticipated Rental Revenue (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/PremisesandEquipmentAnticipatedRentalRevenueDetails</Role>
      <ShortName>Premises and Equipment - Anticipated Rental Revenue (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>240414028 - Disclosure - Premises and Equipment - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/PremisesandEquipmentLeasesDetails</Role>
      <ShortName>Premises and Equipment - Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>85</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>240444029 - Disclosure - Other Real Estate Owned (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherRealEstateOwnedDetails</Role>
      <ShortName>Other Real Estate Owned (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherRealEstateOwnedTables</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>240474030 - Disclosure - Income Taxes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/IncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/IncomeTaxesTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>240504031 - Disclosure - Certificates of Deposit (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CertificatesofDepositDetails</Role>
      <ShortName>Certificates of Deposit (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/CertificatesofDepositTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>240534032 - Disclosure - Borrowed Funds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/BorrowedFundsDetails</Role>
      <ShortName>Borrowed Funds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/BorrowedFundsTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>240564033 - Disclosure - Employee Benefit Plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EmployeeBenefitPlansDetails</Role>
      <ShortName>Employee Benefit Plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/EmployeeBenefitPlansTables</ParentRole>
      <Position>90</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>240574034 - Disclosure - Employee Benefit Plans - Accumulated Post-Retirement Benefit Obligation, Funded Status, and Net Periodic Benefit Cost (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EmployeeBenefitPlansAccumulatedPostRetirementBenefitObligationFundedStatusandNetPeriodicBenefitCostDetails</Role>
      <ShortName>Employee Benefit Plans - Accumulated Post-Retirement Benefit Obligation, Funded Status, and Net Periodic Benefit Cost (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>240584035 - Disclosure - Employee Benefit Plans - Schedule of Net Periodic Benefit Cost Not Yet Recognized (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EmployeeBenefitPlansScheduleofNetPeriodicBenefitCostNotYetRecognizedDetails</Role>
      <ShortName>Employee Benefit Plans - Schedule of Net Periodic Benefit Cost Not Yet Recognized (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>240614036 - Disclosure - Other Comprehensive Income (Loss) - Summary of Unrealized Gains and Losses on Available-for-Sale Securities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherComprehensiveIncomeLossSummaryofUnrealizedGainsandLossesonAvailableforSaleSecuritiesDetails</Role>
      <ShortName>Other Comprehensive Income (Loss) - Summary of Unrealized Gains and Losses on Available-for-Sale Securities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherComprehensiveIncomeLossTables</ParentRole>
      <Position>93</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>240624037 - Disclosure - Other Comprehensive Income (Loss) - Summary of Transfer of AFS Securities to HTM (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherComprehensiveIncomeLossSummaryofTransferofAFSSecuritiestoHTMDetails</Role>
      <ShortName>Other Comprehensive Income (Loss) - Summary of Transfer of AFS Securities to HTM (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherComprehensiveIncomeLossTables</ParentRole>
      <Position>94</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>240634038 - Disclosure - Other Comprehensive Income (Loss) - Summary of Derivative Financial Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherComprehensiveIncomeLossSummaryofDerivativeFinancialInstrumentsDetails</Role>
      <ShortName>Other Comprehensive Income (Loss) - Summary of Derivative Financial Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherComprehensiveIncomeLossTables</ParentRole>
      <Position>95</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>240644039 - Disclosure - Other Comprehensive Income (Loss) - Summary of Unrealized Gains and Losses on Postretirement Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherComprehensiveIncomeLossSummaryofUnrealizedGainsandLossesonPostretirementBenefitsDetails</Role>
      <ShortName>Other Comprehensive Income (Loss) - Summary of Unrealized Gains and Losses on Postretirement Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherComprehensiveIncomeLossTables</ParentRole>
      <Position>96</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>240674040 - Disclosure - Financial Derivative Instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FinancialDerivativeInstrumentsDetails</Role>
      <ShortName>Financial Derivative Instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/FinancialDerivativeInstrumentsTables</ParentRole>
      <Position>97</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>240694041 - Disclosure - Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CommonStockDetails</Role>
      <ShortName>Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/CommonStock</ParentRole>
      <Position>98</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>240724042 - Disclosure - Stock Options and Stock-Based Compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/StockOptionsandStockBasedCompensationNarrativeDetails</Role>
      <ShortName>Stock Options and Stock-Based Compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>240734043 - Disclosure - Stock Options and Stock-Based Compensation - Summary of Restricted Stock Granted (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/StockOptionsandStockBasedCompensationSummaryofRestrictedStockGrantedDetails</Role>
      <ShortName>Stock Options and Stock-Based Compensation - Summary of Restricted Stock Granted (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>240764044 - Disclosure - Earnings Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/EarningsPerShareDetails</Role>
      <ShortName>Earnings Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/EarningsPerShareTables</ParentRole>
      <Position>101</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>240794045 - Disclosure - Regulatory Capital Requirements (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/RegulatoryCapitalRequirementsDetails</Role>
      <ShortName>Regulatory Capital Requirements (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/RegulatoryCapitalRequirementsTables</ParentRole>
      <Position>102</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>240824046 - Disclosure - Off-Balance-Sheet Financial Instruments and Concentrations of Credit Risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OffBalanceSheetFinancialInstrumentsandConcentrationsofCreditRiskDetails</Role>
      <ShortName>Off-Balance-Sheet Financial Instruments and Concentrations of Credit Risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OffBalanceSheetFinancialInstrumentsandConcentrationsofCreditRiskTables</ParentRole>
      <Position>103</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>240854047 - Disclosure - Fair Value Disclosures - Assets and Liabilities Recorded on a Recurring and Nonrecurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FairValueDisclosuresAssetsandLiabilitiesRecordedonaRecurringandNonrecurringBasisDetails</Role>
      <ShortName>Fair Value Disclosures - Assets and Liabilities Recorded on a Recurring and Nonrecurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>240864048 - Disclosure - Fair Value Disclosures - Carrying Amounts and Estimated Fair Values (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/FairValueDisclosuresCarryingAmountsandEstimatedFairValuesDetails</Role>
      <ShortName>Fair Value Disclosures - Carrying Amounts and Estimated Fair Values (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>105</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>240894049 - Disclosure - Other Operating Income and Expense (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/OtherOperatingIncomeandExpenseDetails</Role>
      <ShortName>Other Operating Income and Expense (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/OtherOperatingIncomeandExpenseTables</ParentRole>
      <Position>106</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>240944050 - Disclosure - Condensed Financial Information of Parent (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/CondensedFinancialInformationofParentDetails</Role>
      <ShortName>Condensed Financial Information of Parent (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/CondensedFinancialInformationofParentTables</ParentRole>
      <Position>107</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>240984051 - Disclosure - Quarterly Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/QuarterlyInformationDetails</Role>
      <ShortName>Quarterly Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.thefirst.com/role/QuarterlyInformationTables</ParentRole>
      <Position>108</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>241014052 - Disclosure - Acquisitions and Intangible Assets - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AcquisitionsandIntangibleAssetsAdditionalInformationDetails</Role>
      <ShortName>Acquisitions and Intangible Assets - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</Position>
    </Report>
    <Report instance="fnlc-20201231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>241024053 - Disclosure - Acquisitions and Intangible Assets - Summary of Consideration Paid (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.thefirst.com/role/AcquisitionsandIntangibleAssetsSummaryofConsiderationPaidDetails</Role>
      <ShortName>Acquisitions and Intangible Assets - Summary of Consideration Paid (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>110</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" original="fnlc-20201231.htm">fnlc-20201231.htm</File>
    <File>fnlc-20201231.xsd</File>
    <File>fnlc-20201231_cal.xml</File>
    <File>fnlc-20201231_def.xml</File>
    <File>fnlc-20201231_lab.xml</File>
    <File>fnlc-20201231_pre.xml</File>
    <File>fnlc-20201231x10kex311.htm</File>
    <File>fnlc-20201231x10kex312.htm</File>
    <File>fnlc-20201231x10kex321.htm</File>
    <File>fnlc-20201231x10kex322.htm</File>
    <File>fnlc-20201231x10kex41.htm</File>
    <File>fnlc-2020ex231.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>fnlc-20201231_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/srt/2020-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://fasb.org/us-gaap/2020-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
