<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Version>2.4.0.8</Version><ReportLongName>2107100 - Disclosure - Mortgage loans</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column FlagID="0"><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>D2013Q2YTD</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001555039</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2013-01-01T00:00:00</PeriodStartDate><PeriodEndDate>2013-06-30T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS /><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="6 Months Ended" /><Label Key="Calendar" Id="1" Label="Jun. 30, 2013" /></Labels></Column></Columns><Rows><Row FlagID="0"><Id>1</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>1</Level><ElementName>us-gaap_MortgageLoansOnRealEstateAbstract</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Mortgage Loans on Real Estate [Abstract]</Label></Row><Row FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>2</Level><ElementName>us-gaap_MortgageLoansOnRealEstateByLoanDisclosureTextBlock</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="D2013Q2YTD" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;div style="font-family:Times New Roman;font-size:10pt;"&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;font-weight:bold;"&gt;&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;font-weight:bold;text-decoration:none;"&gt;Mortgage loans at fair value&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;font-weight:bold;"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;font-weight:bold;"&gt;Acquisitions&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;During the &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;six months ended June 30, 2013&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, we completed the acquisition of the following portfolios of non-performing residential mortgage loans:&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;table cellpadding="0" cellspacing="0" style="font-family:Times New Roman; font-size:10pt;"&gt;&lt;tr&gt;&lt;td style="width:48px;" rowspan="1" colspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align:top" rowspan="1" colspan="1"&gt;&lt;div style="line-height:120%;font-size:10pt;padding-left:24px;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&amp;#8226;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="vertical-align:top;" rowspan="1" colspan="1"&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;On February 14, 2013, a portfolio of first lien residential mortgage loans, substantially all of which are non-performing, having aggregate collateral market value of &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$94.2 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; as of the &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;February&amp;#160;1, 2013&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; cut-off date for the transaction. &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table cellpadding="0" cellspacing="0" style="font-family:Times New Roman; font-size:10pt;"&gt;&lt;tr&gt;&lt;td style="width:48px;" rowspan="1" colspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align:top" rowspan="1" colspan="1"&gt;&lt;div style="line-height:120%;font-size:10pt;padding-left:24px;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&amp;#8226;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="vertical-align:top;" rowspan="1" colspan="1"&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;On March 21, 2013, a portfolio of first lien residential mortgage loans, substantially all of which are non-performing, having aggregate collateral market value of &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$38.7 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; as of the &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;March&amp;#160;18, 2013&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; cut-off date for the transaction. &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;table cellpadding="0" cellspacing="0" style="font-family:Times New Roman; font-size:10pt;"&gt;&lt;tr&gt;&lt;td style="width:48px;" rowspan="1" colspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align:top" rowspan="1" colspan="1"&gt;&lt;div style="line-height:120%;font-size:10pt;padding-left:24px;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&amp;#8226;&lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="vertical-align:top;" rowspan="1" colspan="1"&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;On April 5, 2013, a portfolio of first lien residential mortgage loans, substantially all of which are non-performing, having aggregate collateral market value of &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$122.1 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; as of the March 28, 2013 cut-off date for the transaction. &lt;/font&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;During the three and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;six months ended June 30, 2013&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, we expensed &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$0.1 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$0.4 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, respectively, for due diligence costs related to these and other transactions.&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;font-weight:bold;text-decoration:none;"&gt;Transfer of mortgage loans to real estate owned&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;font-weight:bold;"&gt; &lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:justify;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;During the three and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;six months ended June 30, 2013&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, we transferred &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;33&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;34&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; mortgage loans, respectively, at fair value based on broker price opinion (BPO) of &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$4.2 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$4.4 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, respectively, to real estate owned.&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;font-weight:bold;"&gt;Dispositions&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;&lt;br clear="none"/&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="line-height:120%;text-align:left;font-size:10pt;"&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;During the three and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;six months ended June 30, 2013&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, we disposed of &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;28&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;38&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; mortgage loans, respectively, primarily through short sales and foreclosure sales. As a result, we recorded &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$1.7 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt; and &lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;color:#000000;text-decoration:none;"&gt;$2.1 million&lt;/font&gt;&lt;font style="font-family:inherit;font-size:10pt;"&gt;, respectively, of net realized gains on mortgage loans.&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;</NonNumbericText><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>nonnum:textBlockItemType</ElementDataType><SimpleDataType>na</SimpleDataType><ElementDefenition>The entire disclosure for mortgage loans on real estate, this includes the supplemental information pertaining to each mortgage loan receivable that equals or exceeds three percent of the carrying amount of mortgages.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 205

 -SubTopic 10

 -Section S99

 -Paragraph 6

 -Subparagraph (SX 210.5-04.(c) Schedule IV)

 -URI http://asc.fasb.org/extlink&amp;oid=6882300&amp;loc=d3e5864-122674



Reference 2: http://www.xbrl.org/2003/role/presentationRef

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 29

 -Article 12



Reference 3: http://www.xbrl.org/2003/role/presentationRef

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 04

 -Paragraph c

 -Subparagraph Schedule IV

 -Article 5



Reference 4: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 948

 -SubTopic 310

 -Section S99

 -Paragraph 1

 -Subparagraph (SX 210.12-29)

 -URI http://asc.fasb.org/extlink&amp;oid=6589523&amp;loc=d3e617274-123014



</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Mortgage loans</Label></Row></Rows><Footnotes /><IsEquityReport>false</IsEquityReport><ReportName>Mortgage loans</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>true</HasCustomUnits><IsEmbedReport>false</IsEmbedReport><IsMultiCurrency>false</IsMultiCurrency><ReportType>Sheet</ReportType><RoleURI>http://www.altisourceamc.com/role/MortgageLoans</RoleURI><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows></InstanceReport>
